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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
DesrAw
New Member

3. party REST API with header request

Hi everyone

 

I'm not the hardest coder out there, but normally I can youtube my way through. NOT THIS TIME 😞

 

I'm trying to access some ticker data from a REST API in json format, with the following string in advanced editor.

 

= Json.Document(Web.Contents("https://api.coinigy.com/api/v1/data",
     [
         Headers = [#"Content-Type"="application/json",#"X-API-KEY"="6b796808aeddf74791fc85ce03aa276a",#"X-API-SECRET"="5de422bc18e0987fa26d8227a7d442d1"]
     ]
 ))

without the header part I get a auth error. With the header part a get a 404 error.

 

Any suggetions is MUCH appreciated!

3 REPLIES 3
v-ljerr-msft
Microsoft Employee
Microsoft Employee

Hi @DesrAw,

 

Your query looks fine. But I keep getting "Invalid API Key" error in my test.

 

Could you try the query below, then supply an “Api Key” via the credential UI to see if it works? Smiley Happy

Web.Contents(URL, [ApiKeyName="mykey"])

 

Regards

Hi @v-ljerr-msft

 

Thank for your answer. Much appreciated!

 

Yes I altered the API information, because they would give access to sensitive data. 😞

 

The credential UI will ask for a "username" and "password", correct? The API require "X-API-KEY" and "X-API-SECRET". Will that not be a problem?

Hi @DesrAw,

 

have you found a solution to that problem? I am having trouble with the exact same problem.

 

Best,

Pedram

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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