Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin 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.
I have an API call that works in Postman (GET)
It is a OAuth 1.0 authentiacation and I have all keys, secrets and signature.
When I do it in Power Query - I just try to replicate the Headers that Postman.
One of the headers in Postman is "Host" header. Without it - the request doesn't work in Postman. With it - it works.
When I look in Console - it just sends Host: "myurl.com" header.
When I add it in my Power Query request (see in red below) - it suddenly shows an error:
Expression.Error: The 'Host' header must be modified using the appropriate property or method (please see below picture in yellow)
When I click "Edit Settings" - I just get a JSON settings screen - attached.
I tried passing a parameter instead of "myurl.com" - same error.
Other headers don't throw this error.
Without it - it doesn't work either.
Below is the full step code.
Please help!
= Json.Document(Web.Contents("https://myurl.com", [
Headers=[
#"Accept" = "application/schema+json",
#"Authorization"= "OAuth realm=""XXXX"",oauth_consumer_key=""YYY"",oauth_token=""TTTT"",oauth_signature_method=""HMAC-SHA256"",oauth_timestamp=""123456"",oauth_nonce=""ZZZZZ"",oauth_version=""1.0"",oauth_signature=""DDDDDD""",
#"Host" = "myurl.com"
],
RelativePath = "/api/v1/student"
]))
@Anonymous No, sorry, I gave up on this Oauth API and went to ODBC instead...
Hi @michaelsh
Were you able to resolve that issue. I'm also struck with this issue:
Expression.Error: The 'Host' header must be modified using the appropriate property or method.
A little update - I removed the Json.Document, leaving just the Web.Contents part.
I also removed the Accept header.
Same error. Now it I click "Edit Settings" I just see the "From Web" settings where it correctly recognizes my headers.
It just doen't like the "Host" header somehow...
I've played with its values - same error, it just doesn't like this header being there...
Any ideas? Please help...
Hi @michaelsh,
Have tried to use any other methods to invoke your api? AFAIK, normally power query web connector not required 'host' parameters. Maybe you can try to split the authorizations string to standalone parameters and remove 'host'.
Regards,
Xiaoxin Sheng
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
56 | |
55 | |
54 | |
37 | |
29 |
User | Count |
---|---|
77 | |
62 | |
45 | |
40 | |
40 |