Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
vwiles84
Helper III
Helper III

API-Secret, Key and Token

 I am trying to configure my query to pull data from an API.  I have the API address, secret and key.  When I send the secret and key, my answer back is a token (amongst other pieces of information).  I then have to take the token from the first call and authenticate again with a user name and password to obtain the actual data I need for the dashboard report.  Any suggestions on how to code this so it is automatic? 

4 REPLIES 4
amitchandak
Super User
Super User

@vwiles84 , Not very clear, check if you are looking for

https://docs.microsoft.com/en-us/power-bi/developer/automation/walkthrough-push-data-get-token

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Not really,

Basically my API requires me to send a security call with the API Secret and Key.  In the response from that call, i get a login TOKEN.  I then have to make another call with that token and pass it with my website username and password using the API call of the full sales data. 

So the first call output looks like this:

"SellerId": XX,
"sellertoken": "ACTUAL TOKEN REMOVED",
"loginBadLoginCnt": 0,
"sellerEnabled": true,
"loginEnabled": true,
"loginFullName": "NAME REMOVED",
"loginPassword": null,
"SellerCompanyName":
"SellerUseAdvancedCategorySelector": false,
"SellerUseAdvancedItemForm": false,
"SellerUseMultiImageUploader": false,
"loginCustomerService": true,
"loginReceiveTicketEmail": false,
"PickupSchedulingEnabled": false,
"PickupDaysOut": null,
"PickupAdvanceDays": null,
"PickupChangeDays": null,
"PickupMaxItemsPerAppointment": null,
"FedExAccountNumber": null,
"FedExMeterNumber": null,
"FedExKey": null,
"FedExPassword": null,
"AzureQueueName": "u",
"ApiKeyID": "",
"ApiSecretKey": "",
"Error": null
}
 
What I don't know how to do is make this call in Power BI, capture the seller token, then use the seller token in the next call to get the sales data. 

Sorry, but these links did not help. 😕  I've switched to another dashboard creation so I will come back to this when i am able to try again. thanks for your help. 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.