Authorization Key Routes
These are the API routes to do with the API keys on the project.
Create a new API Key With No Note
POST /apiKeys/new/[ User To Grant To ]
This will create a new API Key for a specific user without any note attached.
Headers
Content-Type
application/json
Authorization
<key>
Request
User To Grant To
string
This is a user name to grant to
Response
{
"token": "string"
}{
"error": {
"code": 400,
"message": "Could not create a new auth key"
},
"catchError": "string"
}If Key being used is not System:
{
"error": {
"code": 403,
"message": "Invalid authorization Key!"
}
}If User To Grant Key To is System:
{
"error": {
"code": 403,
"message": "Invalid name, name cannot be System!"
}
}If authorization header not provided:
{
"error": {
"code": 403
"message": "Please specify an authorization key!"
}
}If invalid authorization key:
Create a new API Key With Note
POST /apiKeys/new/[ User To Grant To ]/[ Note ]
This will create a new API Key for a specific user without any note attached.
Headers
Content-Type
application/json
Authorization
<key>
Request
User To Grant To
string
This is a user name to grant to
Note
string
This is a note to be added for the key
Response
If Key being used is not System:
If User To Grant Key To is System:
If authorization header not provided:
If invalid authorization key:
Delete API Key For Users
DELETE apiKeys/remove/[ User To Grant To ]
This will delete all API Keys for a specific user.
Headers
Content-Type
application/json
Authorization
<key>
Request
User To Grant To
string
This is a user name to grant to
Response
If Key being used is not System:
If authorization header not provided:
If invalid authorization key:
Get All Users Keys
GET /apiKeys/getUserKeys/[ User Granted To ]
This will get all the keys for a specific user.
Headers
Content-Type
application/json
Authorization
<key>
Body
name
string
Name of the user
age
number
Age of the user
Response
If authorization keys user is not System:
Get All Keys
GET /apiKeys/getKeys
This will return all API keys.
Headers
Content-Type
application/json
Authorization
<key>
Response
Last updated