Generate Key
Generate new API key to access Raccoon-AI engine.
Method: POST Authorization: JWThttps://engine.raccoon-ai.io/auth/token/api/new
Authorization
Type | Key | Value |
---|---|---|
JWT | Authorization | Bearer ########## |
Request Body
Key | Data Type | Required | Description |
---|---|---|---|
name | string | true | Name for the new key |
expire_in | int | true | Number of days that key will be valid (Maximum is 720 days) |
Types
{
"name": <string>,
"expire_in": <int>
}
Sample
{
"name": "MyKey",
"expire_in": 1
}
Reponse Body
Key | Data Type | Description |
---|---|---|
success | boolean | Indicate the success of the request |
msg | string | Message indicators |
error_code | int | Error code information, only set if success is false |
result | json | Result, only set if success is true. This containes X-Api-Key |
gen_at | datetime | Generated datetime |
Types
{
"success": <boolean>,
"msg": <string>,
"error_code": <int | null>,
"result": {
"X-Api-Key": <string>
},
"gen_at": <datetime>
}
Sample
{
"success": true,
"msg": "API Key issued successfully",
"error_code": null,
"result": {
"X-Api-Key": "rae_######################"
},
"gen_at": "2023-06-11T22:05:26.135339"
}