Available in Classic and VPC
Issue a token for authentication.
Request
This section describes the request format. The method and URI are as follows:
Method | URI |
---|---|
POST | /v1/api/token |
Request headers
For information about the headers common to all Ncloud Chat APIs, see Ncloud Chat request headers.
Request query parameters
You can use the following query parameters with your request:
Field | Type | Required | Description |
---|---|---|---|
id |
String | Required | User ID
|
expireDay |
Integer | Required | Token validity period (day)
|
Request example
The request example is as follows:
curl --location --request POST 'https://dashboard-api.ncloudchat.naverncp.com/v1/api/token?id=39c8de0f-****-****-****-6a1a875df59f&expireDay=5' \
--header 'x-api-key: {API Key}' \
--header 'x-project-id: {Project ID}'
Response
This section describes the response format.
Response body
The response body includes the following data:
Field | Type | Required | Description |
---|---|---|---|
status |
Integer | - | Response status
|
token |
String | - | Created token |
message |
String | - | Error message
|
Response status codes
For information about the HTTP status codes common to all Ncloud Chat APIs, see Common Ncloud Chat response status codes.
Response example
The response example is as follows:
{
"status": 1,
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwcm9qZW...Nn0.Z0ap-h9CH75AiAlME1o6Aa8CL-R4PNTp7Emx82rh0Fg",
"message": ""
}