Legacy Dev Forum Posts

 View Only

Sign Up

Get Access Token Bad Request Exception

  • 1.  Get Access Token Bad Request Exception

    Posted 06-05-2025 18:12

    meet.arun07 | 2017-07-17 12:27:57 UTC | #1

    Hi,

    we are calling the following API for OAuth, validation and redirecting to the respective URL.

    https://login.mypurecloud.com/oauth/authorize?&client_id=19f4938f-6fcd-4f1d-9f76-42fd229e4738&response_type=code&redirect_uri=https://app.email.com/app_Email_Service/app&state=a2B1N0000014aQrUAI

    which in turn PureCloud generates the code, and reframes the URL as below,

    https://login.mypurecloud.com/oauth/token?grant_type=authorization_code&code=ZLY9p0lPy8cq6PHp1urPBhSgnt5VmYei0XFghxkXePg&redirect_uri=https://localhost:8443/APP_Email_Service/app

    This is returning 400 Bad Request as response. Checked the user credentials, everything is updated correctly.

    But the same URL if we run twice or thrice it runs successfully.

    Is there a way to increase the time out of the Code generated by PureCloud?

    Thanks Arun


    tim.smith | 2017-07-17 12:27:38 UTC | #2

    Can you be more specific about exactly what request you're making when you get a 400 response? Can you provide the correlation ID from the response header?

    Documentation for the auth code grant flow can be found here: https://developer.mypurecloud.com/api/rest/authorization/use-authorization-code.html


    meet.arun07 | 2017-07-18 05:59:56 UTC | #3

    Hi Am not using SDK, using the URL and getting response as 400. Kindly let me know, how to get the Correrlation ID.

    Thanks Arun


    tim.smith | 2017-07-18 13:44:01 UTC | #4

    https://developer.mypurecloud.com/api/rest/tips/index.html#8


    system | 2017-08-18 13:44:44 UTC | #5

    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: 1555