Connecting bit.ly with Power BI via API

Recently I came a cross a task to connect/import bit.ly data into Power BI. Simply, I wanted to see number of clicks directly via Dashboards.

The right (or only) way to do so is via API.

There are various guidance online, but since bit.ly updated syntax to v4 non of them were working.

After exploring, and using try/fail method, managed to find the right way.

Here are the steps:

1. First, you need to get an API token from bit.ly. You can do this by logging in to your bit.ly account and going to Settings > Developer settings > API. Enter your password and copy the API token; save it somewhere.

2. Click on the “Get Data” button. Select the “Web” option and enter the URL of the API endpoint you want to use. For example, if you want to get the click data for a specific bitlink, you can use the URL https://api-ssl.bitly.com/v4/bitlinks/{bitlink}/clicks. Replace {bitlink} with the actual bitlink you want to query. Then select “Advanced” add a header with the name “Authorization” and the value “Bearer {token}”. Replace {token} with the API token you got from bit.ly.

3. If asked about type of authorisation, you should choose “Anonymous”.

Finally, you can click on “OK” and Power BI will load the da ta from the API.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top