Linking with OAuth authentication
- Print
- PDF
Linking with OAuth authentication
- Print
- PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
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.
- From the NAVER Cloud Platform console, click the Services > CLOVA Chatbot > Domain menus, in that order.
- Click the [Run builder] button of the domain you want to run the chatbot builder.
- From the chatbot builder, click Chatbot settings > Link service tab.
- Click the [Link] button of the authentication service.
- 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}"
}
Value | Required | Type | Description |
---|---|---|---|
userId | Y | String | User's ID |
platform | Y | String | Messenger platform |
domainCode | Y | String | Code of the current domain |
- The authentication server must send the following response for verified users.
{
"valid": true
}
Value | Required | Type | Description |
---|---|---|---|
valid | Y | Boolean | True returned for verified users |
- 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 }
Value | Required | Type | Description |
---|---|---|---|
platform | Y | String | Messenger platform information |
userId | Y | String | ID for distinguishing users |
nonce | Y | String | Temporary 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 |
needPush | Y | Boolean | Use 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]"
}
Value | Required | Type | Description |
---|---|---|---|
userId | Y | String | ID for distinguishing users |
platform | Y | String | Messenger platform information |
domainCode | Y | String | Domain code for distinguishing domains |
nonce | N | String | If 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?