Husqy API Keys
Overview
API Keys allow you to interact with the Husqy API from another (custom) program or script. API keys are linked to a server and can only be used for interactions related to that server.
In the API Keys dashboard you can find an overview of all API keys of the server. Here you can also create, delete and copy the API keys. The keys themselves are not visible in the dashboard but you are able to copy the keys.
API Keys are also integrated with the logging module to make sure the API key does not get leaked by using it to make changes to settings. Instead the logging module will show: An API key
instead of a user mention.
Please handle these API keys with care and store them securely.
API Endpoints
GET - /auth/api-key/
Get all API keys for a specified guild.
Query string parameters:
field | required | type | description |
---|---|---|---|
guild_id | yes | integer | The ID of the guild to get the API keys of |
Possible errors:
- BadRequestError
POST - /auth/api-key/
Create a new API key for a specified guild.
Body data (JSON):
field | required | type | description |
---|---|---|---|
guild_id | yes | integer | The ID of the guild to create the API key for |
Possible errors:
- BadRequestError
- Unprocessable Entity
{
"success": False,
"data": {},
"error": {
"code": 422,
"message": "Unprocessable Entity! {reason}",
},
},
DELETE - /auth/api-key/
Delete an API key for a specified guild.
Body data (JSON):
field | required | type | description |
---|---|---|---|
guild_id | yes | integer | The ID of the guild to create the API key for |
api_key | yes | string | The API key to delete |
Possible errors:
- BadRequestError
- NotFoundError
{
"success": False,
"data": {},
"error": {
"code": 404,
"message": "Not Found! {reason}",
},
},
- Unprocessable Entity
{
"success": False,
"data": {},
"error": {
"code": 422,
"message": "Unprocessable Entity! {reason}",
},
},
API Keys are not able to get, create or delete other API keys.
Additional Information
- To go to the API keys dashboard, please do the following steps:
- Go to https://dashboard.husqy.xyz/;
- Select the target server;
- In the sidebar press the API Keys tab;