Linking with OAuth authentication
    • PDF

    Linking with OAuth authentication

    • PDF

    Article Summary

    Available in Classic and VPC

    Answers can only be provided to users who have completed authentication through linkage with registered authentication servers. When the one-time authentication is completed initially, answers are provided without an additional authentication process during the time that the user's information is maintained.
    The following describes how to set up linkage with an authentication service.

    1. From the NAVER Cloud Platform console, click the Services > CLOVA Chatbot > Domain menus, in that order.
    2. Click the [Run builder] button of the domain you want to run the chatbot builder.
    3. From the chatbot builder, click Chatbot settings > Link service tab.
    4. Click the [Link] button of the authentication service.
    5. Enter the authentication URL in the Link service window.
      • When the user enters a question, the chatbot calls POST {URL}/confirm and checks the authentication status in the input authentication server to determine whether the user has been verified
      • {URL} is the authentication URL entered by the domain admin
      • The chatbot sends the user's ID and platform information
    {
      "userId": "${userId}",
      "platform": "${platform}",
      "domainCode":"${domainCode}"
    }
    
    ValueRequiredTypeDescription
    userIdYStringUser's ID
    platformYStringMessenger platform
    domainCodeYStringCode of the current domain
    • The authentication server must send the following response for verified users.
    {
      "valid": true
    }
    
    ValueRequiredTypeDescription
    validYBooleanTrue returned for verified users
    1. Enter the authentication request message, authentication failure message, and authentication error message, and then click the [Link] button.
    • In the case of unverified users and users who have failed to authenticate, the chatbot responds with the URL button containing the login link along with the authentication request message or authentication failure message.
      GET {URL}/login?userId=${userId}&platform=${platform}&domainCode=${domainCode}
      
    • When logged in successfully, the authentication server calls the invoke URL.
      The following data must be included when calling the invoke URL.
      {
        "domainCode": "String",
        "platform": "String",
        "userId": "String",
        "nonce": "Option[String]",
       "needPush": true
      }
      
    ValueRequiredTypeDescription
    platformYStringMessenger platform information
    userIdYStringID for distinguishing users
    nonceYStringTemporary password value to be used for link.
    If a nonce value exists, then make the call by including the nonce value received when calling the link API
    needPushYBooleanUse when a push is necessary after obtaining an answer.
    Only LINE and TalkTalk messengers are supported
    • When the login success request is sent to the chatbot builder, a link request is made as a means of confirming the user's successful authentication.
    POST {URL}/link 
    {
      "userId": "String",
      "platform": "String",
      "domainCode": "String",
      "nonce": "Option[String]"
    }
    
    ValueRequiredTypeDescription
    userIdYStringID for distinguishing users
    platformYStringMessenger platform information
    domainCodeYStringDomain code for distinguishing domains
    nonceNStringIf there is a received nonce value, then make the call by including the value received when calling the API.
    • If 200OK is sent when POST {URL}/link is called, then the link is determined to have been a success.
    • If the link is successful, then find the answer to the question entered when the user first made access and respond with it.
    • If the link is unsuccessful, then send the authentication failure message and induce another login attempt.
    • If needPush: true is in the login success request, then push the obtained answer in the case of platforms for which a push is possible.

    Was this article helpful?

    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.