Forum Discussion
callahan_254
1 year agoNew Member
Power Query REST API error
I'm working on a Power Query script in Excel to fetch data from the QGenda API. I'm encountering an error in the first part of my code, which is supposed to retrieve an authentication token. I've al...
- 1 year ago
Change your data source setting accordingly. You need to clear permissions as they are cached.
- 1 year ago
The error occurs because Web.Contents with Content requires a RelativePath. Use this fixed script:
let base_url = "https://api.qgenda.com", url_login = "/v2/login", body = [ email = "emailaddress", password = "password" ], encodedBody = Text.ToBinary(Uri.BuildQueryString(body)), response_login = Web.Contents(base_url, [ RelativePath = url_login, Headers = [#"Content-Type" = "application/x-www-form-urlencoded"], Content = encodedBody ]), jsonResponse = Json.Document(response_login), accessToken = jsonResponse[access_token], OutputToken = accessToken in OutputToken
v-veshwara-msft
Community Support
1 year agoHi callahan_254 ,
We just wanted to check in again regarding your issue. If you’ve found a solution, marking the reply as the solution and leaving a kudos would be greatly appreciated, it helps the community and others with similar questions.
If you’re still facing challenges or have further questions, please let us know.
Thank you.