API Keys and credits

You can check the status and the number of credits associated with your API key by calling the checkKey endpoint.

This request is not authenticated, meaning you do not need to pass the X-API-Keyheader.

const BASE_URL = 'https://api.conblox.xyz/';
const endpoint = 'checkKey';
const API_KEY = "YOUR_API_KEY";
const response = await fetch(BASE_URL + endpoint, {
    method: 'POST',
    headers: {
        'Content-Type': 'application/json',
    },
    body: JSON.stringify({ 'apiKey': API_KEY }),
});

const data = await response.json();

Example Response:

{
    "apiKeyValid": true, 
    "data": {
        "credits": 503
    }
}

In the response:

  • "apiKeyValid": Boolean indicating if the API key is valid.

  • "credits": The number of credits associated with your API key.

For more information on the checkKey endpoint, check the API reference.

Last updated