While generating the OAuth login URL using /v2/login/authorization/dialog, I am getting error UDAPI100068 saying client_id or redirect_uri is incorrect. I have already verified both values and encoding.

Hi Upstox Team,

While generating the OAuth login URL using /v2/login/authorization/dialog, I am getting error UDAPI100068 saying client_id or redirect_uri is incorrect. I have already verified both values and encoding.

Can you please check if there are any specific requirements or configuration issues from your side?

this is code..
const getUpstoxLoginUrl = (clientId, redirectUri, state = “”) => {
return https://api.upstox.com/v2/login/authorization/dialog?response_type=code&client_id=${clientId}&redirect_uri=${encodeURIComponent( redirectUri )}&state=${encodeURIComponent(state)};
};

this is code
Thanks.