The new URL to get the Bearer Access Token is not working for me

I am trying to login to get the token using your new URL:

https://api.upstox.com/v2/login/authorization/dialog?response_type=code&client_id=<MyAPPKey>&redirect_uri=http://localhost:8080/trading/api/v1/auth/upstox-login

But it says either clientId is wrong or uri is wrong with error code as UDAPI100068.

I am carefully putting all the correct values in the url as the below previous URL working fine to me but its token is not getting used in the new API v2

The earlier url still working fine with the apiKey as param:

https://api.upstox.com/index/dialog/authorize?apiKey=<MyAPPKey>&redirect_uri=http://localhost:8080/trading/api/v1/auth/upstox-login&response_type=code.

ALSO the token generated using the earlier URL is not allowed to be used while accessing the new APIs.
e.g.

curl -L -X GET 'https://api.upstox.com/v2/order/retrieve-all' \
> -H 'Accept: application/json' -H 'Authorization: Bearer 21e77caeb8de5e1bd4f6be05d00ecd0ecffbec3c'
{"status":"error","errors":[{"errorCode":"UDAPI100050","message":"Invalid token used to access API","propertyPath":null,"invalidValue":null,"error_code":"UDAPI100050","property_path":null,"invalid_value":null}]}

What can be the issue here ? Or as always its a BUG and upstox team not able to even detect it ?

Ticket Number is 8231208. but i dont think you guys as always will fix it before a month or so

Did you set up the new API application for Upstox API v2? The existing client id of the v1 API is incompatible with the latest Upstox API v2, accessible at Swagger UI.

To create a new API application, visit How to create an API app? - Upstox Help Center. Additionally, you can find the authentication process details at Authentication | Upstox Developer API.

Be aware that the access token from https://api.upstox.com/index/… pertains to Upstox API v1, which is now outdated and no longer supported. I recommend transitioning to the v2 API.

ok. I shall try. Thanks.
. But then how will one know that such step is needed there? Your documentation has not mentioned this step anywhere neither you have communicated over mail for the v2 version of your app. I just started looking for it as some apis started failing.
I don’t think you should follow such practice without notifying existing customer changing everything at the backend :slight_smile:.

Anyways thanks for the reply just after 5 days. Appreciated.

The delete app is also not working.

The create app is also not working.

I tried even on INCONGNITO tab as well.
Which Browser you recommend ?

To create an app for the V2 API, as outlined in here, you should first login to your account. After successful login, navigate to Upstox Accounts to start the app creation process for the Upstox API V2.

After successfully creating the app, you can refer to the Upstox API documentation for authentication, which can be found at Upstox API Authentication Documentation.