Endpoint: GET
https://croncrm.com/api/v2/auth/status
Consulte o status da conexão com o CRONCRM.
| Atributo | Descrição | Obrigatório | Tipo |
|---|---|---|---|
|
|
Informe sua API Key gerada na interface do CRONCRM. |
Sim |
String |
Sem necessidade de passar parâmetros no body.
Se o header apiKey não for informado, o retorno pode ser 400. Método incorreto retorna 405. Em falhas inesperadas, o retorno pode ser 500.
| Atributo | Descrição | Tipo |
|---|---|---|
|
|
Informa se a operação teve sucesso ou não.
|
Boolean |
|
|
Mensagem de retorno. |
String |
|
|
Retorna o status real da conexão com o CRONCRM.
|
String |
|
||
<?php
$apiKey = 'SEU_API_KEY';
$url = 'https://croncrm.com/api/v2/auth/status';
$ch = curl_init($url);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPGET => true,
CURLOPT_HTTPHEADER => [
'apiKey: ' . $apiKey,
],
]);
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$error = curl_error($ch);
curl_close($ch);
if ($error) {
throw new RuntimeException($error);
}
echo "HTTP {$httpCode}\n";
echo $response;
?>
curl -G \
'https://croncrm.com/api/v2/auth/status' \
-H 'apiKey: SEU_API_KEY'