Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hello guys.
Could someone help me?
I hava an ERP which has this API to get data.
POST: https://microworkcloud.com.br/api/integracao/terceiro
Header:
Content-Type: application/json
Host: microworkcloud.com.br
Authorization: Bearer SUA_CREDENCIAL
Body Request:
{
"idrelatorioconfiguracao": 375,
"idrelatorioconsulta": 186,
"idrelatorioconfiguracaoleiaute": 857,
"idrelatoriousuarioleiaute": null,
"ididioma": 1,
"listaempresas": [1,2,3,4,5,6,7,8,9,10,11],
"filtros": "DataInicialFiltrar=2025-02-14;
ContaFinanceiraFiltrar=null;
TipoContaFiltrar=null"
}I would like to test this API but i wasn’t able to do that.
I have bearer token but didn’t work.
Any idea?
Solved! Go to Solution.
Please follow the documentation. Use the payload parameter to make it a POST. https://learn.microsoft.com/en-us/powerquery-m/web-contents#example-2
Hi @carlosfinezi,
We haven’t heard back from you regarding your issue. If it has been resolved, please mark the helpful response as the solution and give a ‘Kudos’ to assist others. If you still need support, let us know.
Thank you.
Hi @carlosfinezi,
May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.
Thank you.
Then i try removing manual credential.
let
url = "https://microworkcloud.com.br/api/integracao/terceiro",
headers = [
#"Content-Type" = "application/json",
#"Authorization" = "Bearer SUA_CREDENCIAL"
],
body = Json.FromValue([
idrelatorioconfiguracao = 375,
idrelatorioconsulta = 186,
idrelatorioconfiguracaoleiaute = 857,
idrelatoriousuarioleiaute = null,
ididioma = 1,
listaempresas = {1,2,3,4,5,6,7,8,9,10,11},
filtros = "DataInicialFiltrar=2025-02-14;ContaFinanceiraFiltrar=null;TipoContaFiltrar=null"
]),
response = Web.Contents(
url,
[
Headers = headers,
Content = body,
ManualStatusHandling = {400, 401, 403, 500}
]
),
jsonResponse = Json.Document(response)
in
jsonResponse
But then PBI ask me credentials, but my credential is bearer token. When testing in postman i dont need to use any credential, only token.
This is what i'm putting in m query:
let
url = "https://microworkcloud.com.br/api/integracao/terceiro",
headers = [
#"Content-Type" = "application/json",
#"Authorization" = "Bearer SUA_CREDENCIAL"
],
body = Json.FromValue([
idrelatorioconfiguracao = 375,
idrelatorioconsulta = 186,
idrelatorioconfiguracaoleiaute = 857,
idrelatoriousuarioleiaute = null,
ididioma = 1,
listaempresas = {1,2,3,4,5,6,7,8,9,10,11},
filtros = "DataInicialFiltrar=2025-02-14;ContaFinanceiraFiltrar=null;TipoContaFiltrar=null"
]),
response = Web.Contents(
url,
[
Headers = headers,
Content = body,
ManualStatusHandling = {400, 401, 500},
ManualCredentials = true
]
),
jsonResponse = Json.Document(response) // ← Sem encoding!
in
jsonResponse
But i have this error:
Expression.Error: 'ManualCredentials' não é uma opção de Web.Contents válida. As opções válidas são:
ApiKeyName, Content, ExcludedFromCacheKey, Headers, IsRetry, ManualStatusHandling, Query, RelativePath, Timeout
Stuff like this is usually tested via Postman before being ported to Power Query.
I tested it there. I got the data. But I could not inside Power BI desktop.
Please follow the documentation. Use the payload parameter to make it a POST. https://learn.microsoft.com/en-us/powerquery-m/web-contents#example-2
Hello @carlosfinezi,
We are glad to hear that when you have tested your API in postman and it got sucessfully worked as expected. But as per my understading when you are trying to connect the API inside Power BI Desktop, it didn’t work. Could you please tell us what should be your expected outcome, so that we will guide you accordingly.
Also if possible please share the error screenshot if you encountered any.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 7 | |
| 7 | |
| 7 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 19 | |
| 14 | |
| 14 | |
| 10 | |
| 9 |