Vertopal
API Menu

Authentication

Vertopal API uses the Bearer authentication scheme (also called token authentication) for authentication and authorization. To begin, obtain client credentials by creating an APP.

Before your application sends requests to the Vertopal API, you must obtain an app ID and an access token that grants access to the API. To authenticate each request, you must put the app ID in its app data key, and send an access token by the Authorization header along with the request.
If you didn't get an error and everything goes well, you will be connected to the Vertopal API.

Request

Header Keys

Authorization string required

The access token of the app is sent with this header to access the Vertopal API.

Pattern
^Bearer (.+)$
The example code of this section shows the structure of the task request. You may see the other request structure keys such as data keys.
HTTP
cURL
CLI
Python
PHP
POST https://api.vertopal.com/v1/example/endpoint
Authorization: Bearer [APP_TOKEN]

data={
    "app": "[APP_ID]"
}
curl -L -X POST 'https://api.vertopal.com/v1/example/endpoint' \
-H 'Authorization: Bearer [APP_TOKEN]' \
-F 'data={
    "app": "[APP_ID]"
}'
vertopal api -v 1 vertopal/endpoint \
--app "[APP_ID]" \
--token "[APP_TOKEN]" \
-F data='{
    "app": "%app-id%"
}'
from vertopal.api.v1 import API

API.example_method(
    app="[APP_ID]",
    token="[APP_TOKEN]",
)
use Vertopal\API\Credential;
use Vertopal\API\V1;

require "vendor/autoload.php";

$credential = new Credential("[APP_ID]", "[APP_TOKEN]");

V1::exampleMethod($credential);

Response

HTTP Status Codes

OK 200

The task has been executed successfully without any errors.

INVALID_AUTHORIZATION_HEADER 403

The Authorization header is invalid.

INVALID_CREDENTIAL 403

The access credential is invalid.

MISSING_AUTHORIZATION_HEADER 403

The Authorization header is required.

The example code of this section shows the structure of the task response. You may see the other response structure keys such as entity keys.
JSON
{
    "result": {
        "output": {
            // sample output data
        },
        "error": {},
        "warning": {}
    }
}
Loading, Please Wait...