Consultar token atual
curl --request GET \
--url https://api.deliveryvip.com.br/authentication/v1/oauth/token/info \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.deliveryvip.com.br/authentication/v1/oauth/token/info"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.deliveryvip.com.br/authentication/v1/oauth/token/info', 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.deliveryvip.com.br/authentication/v1/oauth/token/info",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.deliveryvip.com.br/authentication/v1/oauth/token/info"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.deliveryvip.com.br/authentication/v1/oauth/token/info")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.deliveryvip.com.br/authentication/v1/oauth/token/info")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"resource_owner_id": null,
"resource_owner_type": null,
"scope": [
"od.all"
],
"expires_in": 86400,
"application": {
"uid": "RlvxmDiOqtML0MTq9Nvupuf5f0wprMa7pvNriMQyZ4A"
},
"created_at": 1639571898
}Autenticação
Consultar token atual
Retorna informações sobre o access token enviado no header Authorization, como validade restante, escopos e o aplicativo ao qual pertence.
GET
/
authentication
/
v1
/
oauth
/
token
/
info
Consultar token atual
curl --request GET \
--url https://api.deliveryvip.com.br/authentication/v1/oauth/token/info \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.deliveryvip.com.br/authentication/v1/oauth/token/info"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.deliveryvip.com.br/authentication/v1/oauth/token/info', 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.deliveryvip.com.br/authentication/v1/oauth/token/info",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.deliveryvip.com.br/authentication/v1/oauth/token/info"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.deliveryvip.com.br/authentication/v1/oauth/token/info")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.deliveryvip.com.br/authentication/v1/oauth/token/info")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"resource_owner_id": null,
"resource_owner_type": null,
"scope": [
"od.all"
],
"expires_in": 86400,
"application": {
"uid": "RlvxmDiOqtML0MTq9Nvupuf5f0wprMa7pvNriMQyZ4A"
},
"created_at": 1639571898
}Autorizações
Access token opaco obtido em /authentication/v1/oauth/token.
Resposta
Informações do access token.
Identificador do dono do recurso. Nulo em tokens client_credentials emitidos sem dono.
Exemplo:
null
Tipo do dono do recurso. Nulo quando não há dono.
Exemplo:
null
Escopos do token.
Exemplo:
["od.all"]
Tempo restante de validade, em segundos.
Exemplo:
86400
Show child attributes
Show child attributes
Momento de emissão (Unix timestamp, em segundos).
Exemplo:
1639571898