Autenticação
Obter Token de Acesso
POST
/
api
/
v1
/
auth
/
token
Obter Token de Acesso
curl --request POST \
--url https://api.dnsx.com.br/api/v1/auth/token \
--header 'Content-Type: application/json' \
--data '
{
"client_id": "<string>",
"client_secret": "<string>"
}
'import requests
url = "https://api.dnsx.com.br/api/v1/auth/token"
payload = {
"client_id": "<string>",
"client_secret": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({client_id: '<string>', client_secret: '<string>'})
};
fetch('https://api.dnsx.com.br/api/v1/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://api.dnsx.com.br/api/v1/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' => '<string>',
'client_secret' => '<string>'
]),
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;
}const url = 'https://api.dnsx.com.br/api/v1/auth/token';
const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({client_id: '<string>', client_secret: '<string>'})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));{
"access_token": "<string>",
"token_type": "Bearer",
"expires_in": 123
}⌘I
Obter Token de Acesso
curl --request POST \
--url https://api.dnsx.com.br/api/v1/auth/token \
--header 'Content-Type: application/json' \
--data '
{
"client_id": "<string>",
"client_secret": "<string>"
}
'import requests
url = "https://api.dnsx.com.br/api/v1/auth/token"
payload = {
"client_id": "<string>",
"client_secret": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({client_id: '<string>', client_secret: '<string>'})
};
fetch('https://api.dnsx.com.br/api/v1/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://api.dnsx.com.br/api/v1/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' => '<string>',
'client_secret' => '<string>'
]),
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;
}const url = 'https://api.dnsx.com.br/api/v1/auth/token';
const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({client_id: '<string>', client_secret: '<string>'})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));{
"access_token": "<string>",
"token_type": "Bearer",
"expires_in": 123
}.png?fit=max&auto=format&n=8bFqpa3rKHrcFcON&q=85&s=9f0a4aafb3619ea09fee2c1fda7deb65)