cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
cristian_PBI
Frequent Visitor

PowerQuery connect to API

hi all

 

I'm having difficulties setting up powerquery to get info from an API. 

I use Postman and everything is working just fine. 

 

cristian_PBI_1-1620400606233.png

So from above I'm using the URL from the GET and add it in the URL below and I use the token and add it to the Headers as per below. 

 

cristian_PBI_0-1620400346957.png

 

I use Anonymous auth. 

This gives me the following error

cristian_PBI_2-1620400833995.png

 

I dont get it. Could you help ? 

 

I specify that in order to receive the token I do use another GET action (GetToken). but having this token this should work fine...

 

thank you !

 

1 ACCEPTED SOLUTION
v-jingzhang
Community Support
Community Support

Hi @cristian_PBI 

 

It seems you are using the incorrect header paramter for token. Use Authorization rather than X-API-KEY and add "Bearer " before the token. You could refer to this link: powerbi - Where do I save token in Power BI web connection?

 

Other reference:

powerbi - How do I retrieve a bearer token from a service in Power BI?

 

Regards,
Community Support Team _ Jing
If this post helps, please Accept it as the solution to help other members find it.

View solution in original post

2 REPLIES 2
cristian_PBI
Frequent Visitor

Hello @v-jingzhang 

 

Thank you SO much. Worked like a charm! 

 

Regards 

crisitan 

v-jingzhang
Community Support
Community Support

Hi @cristian_PBI 

 

It seems you are using the incorrect header paramter for token. Use Authorization rather than X-API-KEY and add "Bearer " before the token. You could refer to this link: powerbi - Where do I save token in Power BI web connection?

 

Other reference:

powerbi - How do I retrieve a bearer token from a service in Power BI?

 

Regards,
Community Support Team _ Jing
If this post helps, please Accept it as the solution to help other members find it.

View solution in original post

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Get Ready for Power BI Dev Camp

Power BI Dev Camp - June 24th

Mark your calendars and join us for our next Power BI Dev Camp!

Top Solution Authors
Top Kudoed Authors