OAuth authentication integrations

Prev Next

Available in Classic and VPC

You can respond only to users whose authentication has been completed by connecting a registered authentication server. Once you complete the initial authentication, you can respond with no need for additional authentication procedures while the user's information is retained.
To connect the authentication service:

  1. In the NAVER Cloud Platform console, navigate to i_menu > Services > AI Services > CLOVA Chatbot > Domain.
  2. Click [Run builder] of the domain you want to run the Chatbot Builder.
  3. In the Chatbot Builder, click Chatbot Setting > [Service Integration] tab.
  4. Click [Integrate] of the authentication service.
  5. Enter the authentication URL in the service connection window.
    • Once a user enters a question, the chatbot calls POST {URL}/confirm and check the authentication status at the authentication server to examine whether the user is a certified one.
    • {URL} is a certified one entered by the domain manager.
    • The chatbot delivers both the user's ID and platform information.
{
  "userId": "${userId}",
  "platform": "${platform}",
  "domainCode":"${domainCode}"
}
Value Required Type Description
userId Y String User ID
platform Y String Messenger platform
domainCode Y String The code of the present domain
  • If the user is a certified one, the authentication server has to deliver the response as follows:
{
  "valid": true
}
Value Required Type Description
valid Y Boolean The chatbot returns 'true' if the user is a certified one.
  1. Enter the authentication request message, authentication failure message, and authentication error message, and then click [Integrate].
  • If the user is not certified or failed in authentication, the chatbot responds with an authentication request message or authentication failure message, displaying the URL button including a Login link.
    GET {URL}/login?userId=${userId}&platform=${platform}&domainCode=${domainCode}
    
  • Once you succeed in Login, the authentication server calls the Invoke URL.
    When you call the Invoke URL, it has to include the following data:
    {
      "domainCode": "String",
      "platform": "String",
      "userId": "String",
      "nonce": "Option[String]",
     "needPush": true
    }
    
Value Required Type Description
platform Y String Messenger platform information
userId Y String ID for user identification
nonce Y String Temporary password value for the link
If the nonce value exists, call with the nonce value that you received to call the link api.
needPush Y Boolean Use it if you need a push after gaining the answer.
Only LINE and TalkTalk are supported.
  • Once you deliver the request for successful login to the Chatbot Builder, send a link request to check if the user authentication is successful.
POST {URL}/link 
{
  "userId": "String",
  "platform": "String",
  "domainCode": "String",
  "nonce": "Option[String]"
}
Value Required Type Description
userId Y String ID for user identification
platform Y String Messenger platform information
domainCode Y String Domain code for domain identification
nonce N String If an obtained nonce value exists, call with the value that you received to call the api.
  • If you call POST {URL}/link and then 200OK is delivered, the link is successful.
  • Once the link succeeded, find the answer to the question at the initial access and respond with it.
  • If the link failed, the authentication failure message appears to prompt the user to log in again.
  • If 'needPush: true' in the successful login request, the obtained answer is pushed if a push is possible at the platform.