Login APi URL Error

I use following login api url

https://api.upstox.com/v2/login/authorization/dialog?response_type=code&client_id=<API_KEY>&redirect_uri=<MY_REDIRECT_URL>

first i got the error ‘client_id’ and ‘redirect_uri’; one or both are incorrect, but after encoding URL properrly , I got folowing error

Sorry, you have been blocked

You are unable to access upstox.com

Whats is the Solution for this??

Hi @VIJAY_1099552
Can you share your 6 digit user id, so we can investigate further.

Thanks!

177831

Hi @VIJAY_1099552
We have checked the logs for your user, and as the error message indicates, you are passing an invalid client ID or redirect URL.

It appears that you are using your user ID as the client ID, but the client ID should be the API key of your app.
Please update this and try again — once corrected, you should be able to log in successfully.

Thanks!

I Use proper API Key Not User ID, Also redirect_uri is proper encoded, still I got the message ‘Sorry, you have been blocked’

@VIJAY_1099552
Can you share a screen shot of this error message, and are you using any third party application to connect to upstox?

Dear Team,

Find attached screenshot of error message

URL I fetch

https://api.upstox.com/v2/login/authorization/dialog?response_type=code&client_id=9bb060e4-b9ec-4159-8ae0-1d2f6e73eb19&redirect_uri=https%3A%2F%2Fwww.sarthakinfotech.in%2Fapi%2Fbiller%2FOrderStaRes.php

(attachments)

@VIJAY_1099552
This request is being blocked because of the .php extension at the end of the URL.
If you place the redirect URL parameter before the client ID in the query string, the request will work correctly.

Here’s the correct URL format to use:
https://api.upstox.com/v2/login/authorization/dialog?response_type=code&redirect_uri=https://www.sarthakinfotech.in/api/biller/OrderStaRes.php&client_id=9bb060e4-b9ec-4159-8ae0-1d2f6e73eb19

Thanks!

Yes , it is working now.
Thanks.

Also request you to change your documentation and write clearly that redirect_uri parameters should not be last parameters so other newcomers should not be distracted and waste 4-5 days at first steps