Most endpoints (e.g. those requiring access to your account) require authentication using a token. You can create an API token in your account settings. Your API key will only be shown once, so make sure to record it securely.
Keep your API token secret! In the wrong hands, your API token can be used to gain unlimited, unrestricted access to your account and even delete your account.
We do not permit sharing of your API token with anyone in any way. If you want to share access to the API of a server, add the person as a sub-user and they will be able to create their own token to manage the server.
Authenticate Request
Most endpoints require authentication. Follow this example to authenticate your requests.
Sample authentication
GEThttps://api.cloudnode.pro/v4/
Token is provided with Authorization: Bearer <YOUR TOKEN>. If authentication fails, you will get either err_unauthorised or err_no_permission. See below for more info.
Headers
Name
Type
Description
Authorization*
string
Bearer token_abc123...
{
"code": "err_unauthorised",
"title": "Authentication credentials are missing",
"message": "You did not provide an API key or it was invalid. Please provide your API key in the Authorization header, using e.g. 'Authorization: Bearer YOUR_API_KEY'"
}
{
"code": "err_no_permission",
"title": "No permission",
"message": "Valid authentication credentials are present, but you do not have the required permissions for this endpoint"
}
To authenticate with a session, send a cookie named session and value the session ID.
We strongly advise you to use tokens instead of sessions as their permissions and expiration can be controlled, whereas sessions grant access to all permissions the account holds and can be virtually infinite.
Send your first request
We recommend using our well-maintained Node.js library or command-line interface for the simplest experience in operating our API.
Library
const apiClient = new ApiClient("<YOUR TOKEN>");
console.log(await apiClient.auth.check());
The following are some examples of how you can communicate with our API using other platforms. We only provide limited support for these platforms and we strongly advise you to learn how to work with HTTP requests in your language of choice on your own before using this API.
The Fetch API is available client-side by default without additional code. On Node.js, you can import and use .
XHR can be used in older/legacy browsers which do not support the Fetch API. We do not recommend using XHR server-side, although you could, using one of the many available wrappers on .