Get Access Token Bad Request Exception

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

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

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

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

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