Don't miss your chance to take exam DP-600 or DP-700 on us!
Request nowLearn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! 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
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 53 | |
| 49 | |
| 33 | |
| 16 | |
| 15 |
| User | Count |
|---|---|
| 85 | |
| 70 | |
| 38 | |
| 28 | |
| 25 |