26.09 26.06 26.05 25.12
26.09 26.06 26.05 25.12 Russian English

Validate user token

POST  /api/v1/billing/user/tokens/validate

The user token must be sent in the Authorization.

The integration_id field contains the identifier to assign to the token. An identifier already assigned to another token is rejected with a 403 response.

JSON
{
    "integration_id": "123"
}

Method parameters

string integration_id  required , Identifier to assign to the token: digits only, up to 255 characters, and unique across tokens.

204  No Content

Successful response

401  Unauthorized

Unsuccessful response (token missing, invalid, or not an integration token)

403  Forbidden

Identifier is already assigned to another token

422  Unprocessable Entity

Returns a JSON error object.

For more information, see General information > Validation.

JSON
{
    "message": "No informative message is provided here",
    "errors": {
        "any_key": [
            "The reason for the error is described here"
        ]
    }
}
cURL
Bash
curl -k --request POST \
	--url 'https://your-domain/api/v1/billing/user/tokens/validate' \
	--header 'Content-Type: application/json' \
	--header 'Accept: application/json' \
	--data '{
    "integration_id": "string"
}'
PHP
PHP
$data = array (
  'integration_id' => 'string',
);
$context = stream_context_create([
	'ssl'=>['verify_peer' => false],
	'http' => [
		'method' => 'POST',
		'header' => "Content-Type: application/json\r
Accept: application/json",
		'content'=>json_encode($data)
	]
]);
$result = file_get_contents('https://your-domain/api/v1/billing/user/tokens/validate', false, $context);