fbpx

< / >

token

Token information

URL:

https://{{wolkvox_server}}.crmvox.com/server/API/v2/token/tokenInformation.php?operation={{operation_name}}

Description:

This API allows for detailed tracking of the usage quantity for each generated token.

How it works?:

This API operates through a GET request, which requires the following fields for its proper functioning:

Important: When consuming this API, the token will also be consumed, reducing the remaining consumption availability by 1.

In the request headers, the following is required:

  • Wolkvox-Token: {{token}}
  • Content-Type: application/json

– There are no requirements for the request body.

REQUEST

KEY
DESCRIPTION
EXAMPLE
Wolkvox-Server
Operation server nomenclature.
https://MyServer.crmvox.com/server/API/v2/token/tokenInformation.php?operation=OperationName
Wolkvox-Token
The token generated in the CRM module that you want to query.
‘Wolkvox-Token: token’
operation
Operation name.
operation=OperationName

RESPONSE

KEY
DESCRIPTION
EXAMPLE
code
Indicate the HTTP response code.
“code”: “200”
error
Indicate if there was any error during the request.
“error”: “null”
msg
It is a field that can provide a descriptive message about the outcome of the request.
“msg”: “1 records were are found”
data
It is the specific dataset obtained.
“data”: { “description”: “token”, “token_limit”: 4800, “token_use_today”: 0, “available_consumition_options”: 4800, “hours_to_restart_count”: 15 }
description
It is the token description.
“description”: “token”
token_limit
Indicates the maximum limit of tokens that can be used.
“token_limit”: 4800
token_use_today
Represents the number of tokens used up to the current moment in the current day.
“token_use_today”: 0
available_consumition_options
Indicates the number of tokens that can still be used.
“available_consumition_options”: 4800
hours_to_restart_count
Shows the number of hours that must pass before the usage counter resets.
“hours_to_restart_count”: 15

REQUEST

				
					$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://{{wolkvox_server}}.crmvox.com/server/API/v2/token/tokenInformation.php?operation={{operation_name}}',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_HTTPHEADER => array(
    'Wolkvox-Token: {{token}}',
    'Content-Type: application/json'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

				
			

RESPONSE

				
					{
    "code": "",
    "error": "",
    "msg": "",
    "data": {
        "description": "",
        "token_limit": ,
        "token_use_today": ,
        "available_consumition_options": ,
        "hours_to_restart_count": 
    }
}
				
			
Possible error codes

Usamos cookies, se continuar a navegar assumimos que concorda. Pode ler mais sobre a utilização de cookies nas nossas políticas de privacidade e tratamento de dados pessoais

We use cookies, if you continue browsing we will assume that you agree. You can read more about the use of cookies in our privacy policies and treatment of personal data