Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by watching the DP-600 session on-demand now through April 28th.
Learn moreJoin the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now
Hello All,
I am having trouble getting an access token using an API Post method in API, can some one please help me to convert the below mentioned cURL to Power BI compatible query ?
curl -i -X POST \
-H "Content-Type:application/x-www-form-urlencoded" \
-H "Authorization:Basic AbcDewsgR" \
'https://oauth.brightcove.com/v4/access_token?grant_type=client_credentials'
Thank you
Hi @amitchandak ,
I guess I wasn't clear on my request, I am trying to create an API POST request to get Access Token from brightcove API so that I can use this token to make an GET request using the token received from the above POST API call. Attached is the screenshot of the POST request for your reference. Can you please let me know how do I do this in Power BI ?
cURL code for the below request is :
curl -i -X POST \
-H "Content-Type:application/x-www-form-urlencoded" \
-H "Authorization:Basic AbcdfRtwSrte" \
'https://oauth.brightcove.com/v4/access_token?grant_type=client_credentials'
I tried to convert the above cURL and below is the query but this gives me an error,
let
Source = Json.Document(Web.Contents(
"https://oauth.brightcove.com/v4/access_token?grant_type=client_credentials",
[
Query=[grant_type="client_credentials"],
Headers=[#"Content-Type" = "application/x-www-form-urlencoded", #"Authorization" = "Basic AbcdfRtwSrte"]
])),
items=Source[items]
in
items
Error Message :
DataSource.Error: Web.Contents failed to get contents from 'https://oauth.brightcove.com/v4/access_token?grant_type=client_credentials' (404): Not Found
Details:
DataSourceKind=Web
DataSourcePath=https://oauth.brightcove.com/v4/access_token
Url=https://oauth.brightcove.com/v4/access_token?grant_type=client_credentials
Hi @Anonymous ,
Try to modify your query as below:
let
Source = Json.Document(Web.Contents(
"https://oauth.brightcove.com/v4/access_token",
[
Query=[grant_type="client_credentials"],
Headers=[#"Content-Type" = "application/x-www-form-urlencoded", #"Authorization" = "Basic AbcdfRtwSrte"]
])),
items=Source[items]
in
items
Check out the April 2026 Power BI update to learn about new features.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 41 | |
| 37 | |
| 34 | |
| 21 | |
| 16 |
| User | Count |
|---|---|
| 64 | |
| 58 | |
| 31 | |
| 25 | |
| 25 |