Legacy Dev Forum Posts

 View Only

Sign Up

Access token request return bad request

  • 1.  Access token request return bad request

    Posted 06-05-2025 18:08

    BasaraK | 2021-09-18 06:50:30 UTC | #1

    Hi Yesterday I got an access token via POST by following https://developer.inindca.com/api/tutorials/oauth-client-credentials/?language=python&step=1. But today with the same code I can't get access token response.status_code is 400 - Bad Request How can i fix it.

    Here is my code


    Jerome.Saint-Marc | 2021-09-20 06:44:10 UTC | #2

    Hello,

    A 400 response means there is something wrong with your request. The response body often indicates what was wrong with the request. You can display the response body in your code (in case of failure) and check what message/information it gives (to help you identify the reason of the issue).

    As you are saying it used to work, a possibility is that someone in your company deleted/disabled the OAuth client that you are using (the OAuth Client Credentials Grant client or generated a new Client Secret for this OAuth client.

    As a side note, you can leverage the Platform API Python SDK to manage your authentication flow. See this tutorial as an example With the Platform API Python SDK, you can also enable Logging in the SDK.

    Regards,


    system | 2021-10-21 06:44:26 UTC | #3

    This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.


    This post was migrated from the old Developer Forum.

    ref: 12047