Forum Discussion

dedelman_clng's avatar
dedelman_clng
Community Champion
2 years ago
Solved

help with POST api call

I am trying to replicate the API call which includes refresh of an access token as described here: https://community.fabric.microsoft.com/t5/Power-Query/Refresh-token-api-call/td-p/937553    My API...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi David ,

    In your Postman request, you’re using "login" and "security_Key" as keys, but in your Power Query code, you’re using   "login_id" and "security_key" .

    so please verify that all required parameters are correctly provided and that there are no typos or case sensitivity issues with the parameter names.

    In Power Query, when you're constructing the body of a POST request, it's crucial to ensure that the body is a binary type because the function expects the option to be binary. So please check this:

    body = Text.ToBinary(Json.FromValue([login_id = client_id, security_key = client_secret])), 

    Best Regards,
    Gao

    Community Support Team

     

    If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
    If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

    How to get your questions answered quickly--How to provide sample data in the Power BI Forum--China Power BI User Group