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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
vasu1
Regular Visitor

Power BI Query to Generate Bearer Token for an OData API

Hi,

 

I am using an OData API which requires Bearer token to connect Power BI but token will expires.We are looking for a Power BI Query which should generate Bearer Token . 

 

please help on this.

3 REPLIES 3
Anonymous
Not applicable

Hi @vasu1,

 

In my opinion, I'd like to suggest to package your get token method as an custom function, then you can invoke it before you invoke odata api. it can work through token timeout issue.

 

Regards,

Xiaoxin Sheng

Hi @Anonymous
 
can you please provide me a sample Custom function code to generate Token.
Anonymous
Not applicable

Hi @vasu1,

 

Maybe you can refer to following link told about how get twitter api access token:

Get Data from Twitter API with Power Query

 

Regards,
Xiaoxin Sheng

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.