Get current access token
curl --request GET \
--url https://api.extole.io/v4/tokens \
--header 'Authorization: <api-key>'import requests
url = "https://api.extole.io/v4/tokens"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.extole.io/v4/tokens', 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.extole.io/v4/tokens",
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: <api-key>"
],
]);
$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.extole.io/v4/tokens"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
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.extole.io/v4/tokens")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.extole.io/v4/tokens")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"access_token": "<string>",
"client_id": "<string>",
"expires_in": 123,
"identity_id": "<string>",
"person_id": "<string>",
"scopes": [
"BACKEND"
],
"type": "MANAGED"
}Authentication
Get current access token
Returns the metadata for the access token used to authenticate the request (type, client_id, identity_id, expires_in, scopes). Equivalent to GET /v4/tokens/{token} but without having to repeat the token in the URL path.
GET
https://api.extole.io
/
v4
/
tokens
Get current access token
curl --request GET \
--url https://api.extole.io/v4/tokens \
--header 'Authorization: <api-key>'import requests
url = "https://api.extole.io/v4/tokens"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.extole.io/v4/tokens', 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.extole.io/v4/tokens",
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: <api-key>"
],
]);
$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.extole.io/v4/tokens"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
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.extole.io/v4/tokens")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.extole.io/v4/tokens")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"access_token": "<string>",
"client_id": "<string>",
"expires_in": 123,
"identity_id": "<string>",
"person_id": "<string>",
"scopes": [
"BACKEND"
],
"type": "MANAGED"
}Response
Successful response
Access-token metadata returned by POST /v4/tokens, POST /v4/tokens/openid-connect/authorization-code-flow, GET /v4/tokens, GET /v4/tokens/{token}, and PUT /v4/tokens/exchange/{token}. Pass access_token in the Authorization header (Bearer ...) on subsequent requests.
Authorization scopes granted to this token. Determines which API operations the token may invoke.
Authorization scopes granted to this token. Determines which API operations the token may invoke.
Available options:
BACKEND, CLIENT_ADMIN, CLIENT_REPORT_DOWNLOAD, CLIENT_SUPERUSER, ONE_TIME, PASSWORD_RESET, USER_SUPPORT, VIEWER Was this page helpful?
