i am trying to integrate my login with python but facing this error with login url, can you help me with this
“This API is deprecated, please migrate to Upstox API v2. For more details refer API Documentation – Fast Secure Free – Upstox | Upstox Developer API”
this is the error.
Hi,
Please ensure that the Login URL for Upstox API is:
https://api.upstox.com/v2/login/authorization/dialog?client_id={client_id}&redirect_uri={redirect_uri}
Make sure to URL encode the client_id
and redirect_uri
parameters in your code before using them in the URL.
For example, in Python, you can use the following snippet:
import urllib.parse
client_id = "<your_client_id>"
redirect_uri = "<your_redirect_uri>"
encoded_client_id = urllib.parse.quote(client_id)
encoded_redirect_uri = urllib.parse.quote(redirect_uri)
login_url = f"https://api.upstox.com/v2/login/authorization/dialog?client_id={encoded_client_id}&redirect_uri={encoded_redirect_uri}"
This ensures that the URL is properly formatted and prevents any encoding-related issues. Hope it helps.
Thanks & Regards
Thank you for the response, the url i got as it is you mentioned but now i am getting though i find everything is correct
{“status”:“error”,“errors”:[{“errorCode”:“UDAPI100068”,“message”:“Check your ‘client_id’ and ‘redirect_uri’; one or both are incorrect.”,“propertyPath”:null,“invalidValue”:null,“error_code”:“UDAPI100068”,“property_path”:null,“invalid_value”:null}]}
can you help me what exactly i have to check.
Regards.
Rajan
Did you replace the client code and redirect URI with the original & correct one?