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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
michaelsh
Kudo Kingpin
Kudo Kingpin

Authorization Header for OAuth 1.0 API

I have a Postman OAuth 1.0 API call which is working great.

I have all the necessary parameters: realm, consumer key, consumer secret, token id, token secret...

I send them in headers with HMAC-SHA256. Works fine in Postman.

I need to construct the same call in Power Query. I notice that Postman automatically creates this header (below).
While I do have the data for the first 4 parameters, but how do I construct the others (in red)?

Thank you!

 

Authorization:
OAuth realm="11111111",
oauth_consumer_key="XXXXXXXXXXXXX",
oauth_token="YYYYYYYYYYY",
oauth_signature_method="HMAC-SHA256",
oauth_timestamp="9999999999",
oauth_nonce="ZZZZZZZZ",
oauth_version="1.0",
oauth_signature="QQQQQQQQQQQ"

5 REPLIES 5
jorge7281
New Member

check this URL https://oauth1.wp-api.org/docs/basics/Signing.html : point 2.3 Signing Requests.

You have to create a basestring with the different info you have then create the signature key (consumer secret & token secret) with those 2 "strings" you can generate the HMAC text with online website like https://www.devglan.com/online-tools/hmac-sha256-online

boley2131
Frequent Visitor

Did you ever get this figured out?  I'm facing the same challenge.  Thanks!

michaelsh
Kudo Kingpin
Kudo Kingpin

Having read a bit more, I understand that:
oauth_nonce can be a random number (maybe encoded?)

- oauth_timestamp - is just a timestamp
- which leaves us only with the question - how do I create oauth_signature?

I understand that it is somehow encoded from all other parameters...

Maybe someone can please share their Power Query code for this....

Thanks a lot!

Anonymous
Not applicable

Hi @michaelsh 

Could you tell me if your problem has been solved? If it is, kindly share your workround and Accept it as the solution. More people will benefit from it. Or you are still confused about it, please provide me with more details about your problem.

 

Best Regards,

Rico Zhou

No, @Anonymous , the problem is still there.

 

For OAuth1.0 authorization I need to create an oauth_signature.

To do that I need HMAC-SHA1 hash function.

How do I do it in Power Query, without R/Python?

Thanks

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.