We are now verified! Husqy is now a verified bot in Discord making us visible in the app discovery and enabling bigger trust to users!
Want to help us translate the Husqy responses? We can't do it without you! Please visit our translations repo!
Skip to main content

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.

warning

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:

fieldrequiredtypedescription
guild_idyesintegerThe 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):

fieldrequiredtypedescription
guild_idyesintegerThe 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):

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild to create the API key for
api_keyyesstringThe 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}",
},
},
warning

API Keys are not able to get, create or delete other API keys.

Additional Information

info
  • To go to the API keys dashboard, please do the following steps:
    1. Go to https://dashboard.husqy.xyz/;
    2. Select the target server;
    3. In the sidebar press the API Keys tab;