Obter Token de Acesso
curl --request POST \
--url https://beta-jackson.safest.com.br/api/seguros/auth/token \
--header 'Content-Type: application/json' \
--data '
{
"client_id": "seu_client_id_aqui",
"client_secret": "seu_client_secret_aqui"
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({client_id: 'seu_client_id_aqui', client_secret: 'seu_client_secret_aqui'})
};
fetch('https://beta-jackson.safest.com.br/api/seguros/auth/token', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://beta-jackson.safest.com.br/api/seguros/auth/token",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'client_id' => 'seu_client_id_aqui',
'client_secret' => 'seu_client_secret_aqui'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"success": true,
"response": {
"access_token": "a1b2c3d4e5f6g7h8i9j0.1234567890",
"refresh_token": "abc123def456ghi789jkl012mno345pqr678stu901vwx234yz",
"token_type": "Bearer",
"expires_in": 1800,
"expires_at": "2026-02-13T18:30:00+00:00"
}
}{
"success": false,
"response": "Credenciais inválidas."
}API Reference
Obter Token de Acesso
Obtém um token de acesso usando as credenciais do cliente (OAuth 2.0 Client Credentials).
O access_token expira em 30 minutos. Use o refresh_token para renovar.
POST
/
seguros
/
auth
/
token
Obter Token de Acesso
curl --request POST \
--url https://beta-jackson.safest.com.br/api/seguros/auth/token \
--header 'Content-Type: application/json' \
--data '
{
"client_id": "seu_client_id_aqui",
"client_secret": "seu_client_secret_aqui"
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({client_id: 'seu_client_id_aqui', client_secret: 'seu_client_secret_aqui'})
};
fetch('https://beta-jackson.safest.com.br/api/seguros/auth/token', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://beta-jackson.safest.com.br/api/seguros/auth/token",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'client_id' => 'seu_client_id_aqui',
'client_secret' => 'seu_client_secret_aqui'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"success": true,
"response": {
"access_token": "a1b2c3d4e5f6g7h8i9j0.1234567890",
"refresh_token": "abc123def456ghi789jkl012mno345pqr678stu901vwx234yz",
"token_type": "Bearer",
"expires_in": 1800,
"expires_at": "2026-02-13T18:30:00+00:00"
}
}{
"success": false,
"response": "Credenciais inválidas."
}Body
application/json

