Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.
Hi all,
I am very much new to importing data from API. Can anyone help me with this? I currently have the url through which I need to import the data which is basically in JSON format. I tried to import the data through web connector but it got failed due to authentication error. How do I get an key for the API provided?
Solved! Go to Solution.
Hi @Anonymous ,
Connect to a secure URL that accepts an authentication key as part of its query string. Instead of hard-coding the secret key in M (which would pose a security risk), the key can be provided securely by specifying its name (not its value) in M, choosing Web API authentication, and entering the key value as part of the Web API credential. When used in this way, the following example will generate a request to "https://contoso.com/api/customers/get?api_key=******".
Web.Contents - PowerQuery M | Microsoft Learn
I have also found a similar post , please refer to it to see if it helps you.
Solved: Re: REST API Get Access Token - Microsoft Power BI Community
Best Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
Connect to a secure URL that accepts an authentication key as part of its query string. Instead of hard-coding the secret key in M (which would pose a security risk), the key can be provided securely by specifying its name (not its value) in M, choosing Web API authentication, and entering the key value as part of the Web API credential. When used in this way, the following example will generate a request to "https://contoso.com/api/customers/get?api_key=******".
Web.Contents - PowerQuery M | Microsoft Learn
I have also found a similar post , please refer to it to see if it helps you.
Solved: Re: REST API Get Access Token - Microsoft Power BI Community
Best Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous , if you need data from REST APis, these can help
Rest API
https://community.powerbi.com/t5/Power-Query/Using-a-REST-API-as-a-data-source/td-p/50400
https://www.progress.com/tutorials/odbc/directquery-your-custom-rest-api-in-power-bi
https://zappysys.com/blog/howto-import-json-rest-api-power-bi/
https://www.youtube.com/watch?v=ipI6mrWLQKA
https://community.powerbi.com/t5/Developer/REST-API-Get-Access-Token/m-p/1895937
Rest source - Token based
https://www.advaiya.com/generate-dynamic-token-and-get-data-from-custom-api-in-power-bi/
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 76 | |
| 37 | |
| 31 | |
| 27 | |
| 27 |