Want to send extra parameter in kakao authorization URL

Hi kakao,
I am trying to concatenate an extra parameter called as “&acquisition=1188” in your authorization URL for my use case. And this extra parameter would help us in tracking our business user. This URL with an extra parameter would look like this.

https://kauth.kakao.com/oauth/authorize?client_id=1234&redirect_uri=https:/ABCD.com&response_type=code&scope=profile%20account_email&acquisition=1188

Is this possible in any way?

Thanks and Regards

hellow @anon68897796.

Login RedirectURI does not accept custom query parameters.

If you want to pass parameters when requesting login,
By using the ‘state’ parameter, you can pass additional parameters.
When passing your parameter to the ‘state’ parameter , you can get the ‘state’ value from your RedirectURI along with the CODE value.

For example, you can request like the following URL.
Request

https://kauth.kakao.com/oauth/authorize?client_id=1234&redirect_uri=https:/ABCD.com&response_type=code&scope=profile%20account_email&state=param1:value1,param2:value2

Response

https://your-redirect-uri/path?code=?&state=param1:value1,param2:value2

Hi,
Now I am able to send my extra customized values in the ‘state’ parameter and retrieve it back but I am not able to get the token values back. Error is giving as “status_mismatch”.

Can you tell me what is the problem while fetching the token after I log in using the kakao account.

Request-
https://kauth.kakao.com/oauth/authorize?client_id=1234&redirect_uri=abcd.com&response_type=code&scope=account_email%20profile%20phone_number%20plusfriends&state=aquisition:1199

Response-
I am getting back the authorization code and state parameter as you mentioned earlier.

Thanks

1개의 좋아요

Hi,
As state is a auto generated number for social login so is it fine to modify it and send extra parameter in state?

Or is there any other way to handle this?

hi @anon68897796

yes, ‘state’ parameter can be freely used according to your needs.