Trying to call the rest api for getting verfication code

When i call the rest api to get the verification code it is not giving the proper response. Actually we are doing the integration of login through kakao to our site. And one more query how we get the user token if i don’t have the user account. Is kakao provides any dummy customer so that i can test these api??

And in the getting verification code api what should be the redirect uri? is it for our pipeline or kakao’s pipeline??

in the response i am getting a page i did not able to understand what page that was. Please find the response

index.txt (309.0 KB)

1개의 좋아요

Hello,

Could you let us know which response code and message have you received?

I’m sorry to tell you that we don’t provide dummies for tests. You can create an account here.

Kakao Login is based on OAuth 2.0. You can check its official document.

The attachment is the content of a html file, it doesn’t include response. You should run it on your server and please let us know what was the actual response.

Thank you!

But wen i run the api on server i got the HTML file in response

Well, it seems like our login page. If you used REST API, it’s a part of the login process.
When you request code with REST API, a web page will be opened to get user’s input.
User will input his/her Kakao Account information on this page to be verified,
and Kakao server will validate the user to give auth code.
You can get user’s access token with that code.
This is the whole process of Kakao Login.

Actually we are not using Oauth Flow in our implementation. The requirement is that we have channel and in that channel Kakao will configure a button that will redirect to our site and we will check if the customer already exist then we link both the accounts otherwise we open the registration page of our site.
So, when the kakao user open that button channel we need to hit the api but we are not getting proper response and also the button is not yet on channel and we don’t have user on that channel as well.
So. please let us know how we can proceed.

And please provide us the steps as well.

Please find the flow diagram as well.

image

Channel -> Terms and condition (configured on kakao) -> landing page(registration/login)

1개의 좋아요

In Kakaotalk, you can login with Kakaotalk’s session, without input your account information.
Our Auth server checks whether the user requested login on Kakaotalk or not. If yes, it works with Kakaotalk’s session. Login web page won’t be shown.
Please test it on Kakaotalk in-App browser.

Can you please provide the document link which i can refer for kakaotalk’s session login?
And is the same API works here as well like for getting verification code and user token etc?

It’s same API.
I’m sorry, currently we are providing documents only in Korean. I think you have seen this before…
https://developers.kakao.com/docs/latest/ko/kakaologin/rest-api
There is no text about Kakaotalk’s session. We will update about this case to the document soon! Thank you.

can we connect on call if possible may be on skype or any other platforms?

and i have a kakao account but when i try to login through kakaotalk app below error comes

image

and when i try to do find the kakao account then it asks me for the phone number.

Can you please elaborate the steps how can i login in kakaotalk from session because i will try with app then session will not be available

can you please share the url of kakaotalk browser login

When i try to hit the request from browser i am getting this error. Please find the screenshot

image

And please assist how i can resolve this error

The message means that your Kakao Account is not registered.
If you made an account with an email address, you should activate it.

And this message means that you should check the value of redirect uri on Kakao Developer’s app info.
The actual value of redirect uri was not same to any registered values of app info.
You can register redirect uris on your app info. [내 애플리케이션] > [카카오 로그인] > [Redirect URI].

Can you please let me know how can i find the “Personal Identification value (CI)” which is given by kakao. Is this is same as ID which we receive when we call the user information rest api?

You can get CI when you are using Kakao Sync.
https://developers.kakao.com/docs/latest/ko/user-mgmt/common#user-info
Please check this document about the user information.

Some kind of user information is not provided default, but you can access them with an additional service which called Kakao Sync. Further guide documents are following.
https://developers.kakao.com/docs/latest/ko/kakaosync/common
https://developers.kakao.com/docs/latest/ko/kakaosync/design

can you please tell me the api from which i can retrieve the CI value?

Also earlier when i call the get verification api then terms and conditions page opens and when i click on accept and continue then i receive the code in URL but now terms and condition page is not opening directly i got the authorization code.
Could you assist what is the issue behind this?

CI is provided via “/v2/user/me”, but if you don’t use Kakao Sync, CI will not be included in the response.

Because the user accept the terms and conditions only once when the user has been connected to the app.
So that’s normal process. If you want to see the page with terms and condition again,
please try to unlink and login again.
Here is a document. https://developers.kakao.com/docs/latest/ko/kakaologin/rest-api#unlink

Total process seems like this.

  1. First Kakao Login for each user
    [Kakao Login, Request Code] > [Agree to the terms and conditions] > [User and App are now connected!] > [Get Code] > [Request Token with Code] > [Get Token] > [Request User Info with Token]

  2. Second Kakao Login for each registered/connected user
    [Kakao Login, Request Code] > [Get Code] > [Request Token with Code] > [Get Token] > [Request User Info with Token]

As i can see from the first call i.e. get verification code call in which we get the authorization code in that terms and condition page opens and when user agrees then we got the code in the redirect URL

So, as per the document terms and condition page is handled by Kakao and is configured on kakao as well so, do we have to make this call or kakao will directly gives us the authorization code by making the get verification call on their side.

Please explain.

You have to request user token with code by calling API.


Please refer to your flow chart. That’s correct!

Yes, we have to request token with code but does kakao gives the code already or we have to hit the authorization code api as well to get the code??
As terms and condition page is configured on kakao side and when user clicks on agreement then we receive the code in URL.
So, how we will show terms and condition page if we will do the authorization call?
Can we have a call to understand the flow better?

I am sorry, but we support our partners only via Devtalk.

Step 1. Request Code (There is only ONE code!), the code will be sent via redirect uri (302 redirect, in Location)
Step 1-1. If the user is a new user, the user will see a page including terms and conditions.
https://developers.kakao.com/docs/latest/ko/kakaologin/rest-api#request-code

Step 2. Request Token with Code from Step 1. Now Kakao Login is finished and you’ve got Access Token to request other APIs.
https://developers.kakao.com/docs/latest/ko/kakaologin/rest-api#request-token

Step 3. Request user information with Access Token from Step 2.
https://developers.kakao.com/docs/latest/ko/user-mgmt/rest-api#req-user-info

I can’t understand where are you stuck in this flow. :cry:
Simply, when you need to login on Kakaotalk In-App browser without user’s account input page, then try to test it like this.

  1. Send a Kakaotalk message with an URL
    https://kauth.kakao.com/oauth/authorize?client_id={YOUR REST API Key}&redirect_uri={YOUR REDIRECT URI}&response_type=code
  2. Click the URL to open an In-App browser.