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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors