Invalid Credentials when hitting the oauth authorisation

image

my redirect uri - http://localhost:3000/login

Please share your UCC. Weā€™ll review this and respond.

Meanwhile, usual reasons for invalid credentials typically involve inconsistencies in client_id, client_secret, response_type, or redirect_uri. Ensure these values perfectly match what you entered during the app creation process.

1 Like

2YA7YQ

Everything looks fine to me. I still get that.

@Surya_Vamsi,

It appears that there are two apps under your registration, and attempts to access the API through both have resulted in ā€˜Invalid Credentialsā€™ errors.

The issue seems to be with incorrect redirect URIs used in your authorization calls. Here are the specific discrepancies:

  1. For App 1, the registered redirect URI is http://127.0.0.1:3000/login, but the API call used http://localhost:3000/login.
  2. For App 2, the registered redirect URI is http://localhost:3000/login, whereas the API call was made to http://localhost:3000/login/. Note the additional slash at the end of the URI.

Please rectify these discrepancies in the redirect URIs and attempt the authorization process again.

Thank you!

I changed the URIā€™s temporarily to test a few things, but the correct URIā€™s donā€™t work either.

image

@Surya_Vamsi,

Please provide the URL youā€™re using to initiate the login. For security purposes, you may omit the client_id when sharing this information.

Thanks!

https://api.upstox.com/v2/login/authorization/dialog?response_type=code&client_id=[CLIENT_ID]&redirect_uri=http://localhost:3000/login&state=test

@Surya_Vamsi

Weā€™ve resolved the issue on our end. Please try again and inform us if itā€™s working for you now.

Thanks!

1 Like

Thanks, Its working now.

Thanks for confirming. Happy coding!!