Get Token
curl --request POST \
--url https://auth.catenatelematics.com/realms/catena/protocol/openid-connect/token \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data grant_type=client_credentials \
--data client_id= \
--data client_secret= \
--data scope=organizationimport requests
url = "https://auth.catenatelematics.com/realms/catena/protocol/openid-connect/token"
payload = {
"grant_type": "client_credentials",
"client_id": "",
"client_secret": "",
"scope": "organization"
}
headers = {"Content-Type": "application/x-www-form-urlencoded"}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
body: new URLSearchParams({
grant_type: 'client_credentials',
client_id: '',
client_secret: '',
scope: 'organization'
})
};
fetch('https://auth.catenatelematics.com/realms/catena/protocol/openid-connect/token', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://auth.catenatelematics.com/realms/catena/protocol/openid-connect/token"
payload := strings.NewReader("grant_type=client_credentials&client_id=&client_secret=&scope=organization")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}require 'uri'
require 'net/http'
url = URI("https://auth.catenatelematics.com/realms/catena/protocol/openid-connect/token")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/x-www-form-urlencoded'
request.body = "grant_type=client_credentials&client_id=&client_secret=&scope=organization"
response = http.request(request)
puts response.read_bodyHttpResponse<String> response = Unirest.post("https://auth.catenatelematics.com/realms/catena/protocol/openid-connect/token")
.header("Content-Type", "application/x-www-form-urlencoded")
.body("grant_type=client_credentials&client_id=&client_secret=&scope=organization")
.asString();using RestSharp;
var options = new RestClientOptions("https://auth.catenatelematics.com/realms/catena/protocol/openid-connect/token");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddParameter("grant_type", "client_credentials");
request.AddParameter("client_id", "");
request.AddParameter("client_secret", "");
request.AddParameter("scope", "organization");
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://auth.catenatelematics.com/realms/catena/protocol/openid-connect/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 => "grant_type=client_credentials&client_id=&client_secret=&scope=organization",
CURLOPT_HTTPHEADER => [
"Content-Type: application/x-www-form-urlencoded"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"access_token": "eyJhbGciOiJIUzUxMiIsInR5cCIgOiAiS...",
"expires_in": 123,
"token_type": "Bearer",
"refresh_expires_in": 123,
"session_state": "123e4567-e89b-12d3-a456-426614174000",
"not-before-policy": 0,
"scope": "fleet:read share-agreement:read telematics:read"
}OAuth 2.0
Get Token
Exchange your credentials for an OAuth2 token to access the Catena Telematics API endpoints.
POST
/
protocol
/
openid-connect
/
token
Get Token
curl --request POST \
--url https://auth.catenatelematics.com/realms/catena/protocol/openid-connect/token \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data grant_type=client_credentials \
--data client_id= \
--data client_secret= \
--data scope=organizationimport requests
url = "https://auth.catenatelematics.com/realms/catena/protocol/openid-connect/token"
payload = {
"grant_type": "client_credentials",
"client_id": "",
"client_secret": "",
"scope": "organization"
}
headers = {"Content-Type": "application/x-www-form-urlencoded"}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
body: new URLSearchParams({
grant_type: 'client_credentials',
client_id: '',
client_secret: '',
scope: 'organization'
})
};
fetch('https://auth.catenatelematics.com/realms/catena/protocol/openid-connect/token', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://auth.catenatelematics.com/realms/catena/protocol/openid-connect/token"
payload := strings.NewReader("grant_type=client_credentials&client_id=&client_secret=&scope=organization")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}require 'uri'
require 'net/http'
url = URI("https://auth.catenatelematics.com/realms/catena/protocol/openid-connect/token")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/x-www-form-urlencoded'
request.body = "grant_type=client_credentials&client_id=&client_secret=&scope=organization"
response = http.request(request)
puts response.read_bodyHttpResponse<String> response = Unirest.post("https://auth.catenatelematics.com/realms/catena/protocol/openid-connect/token")
.header("Content-Type", "application/x-www-form-urlencoded")
.body("grant_type=client_credentials&client_id=&client_secret=&scope=organization")
.asString();using RestSharp;
var options = new RestClientOptions("https://auth.catenatelematics.com/realms/catena/protocol/openid-connect/token");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddParameter("grant_type", "client_credentials");
request.AddParameter("client_id", "");
request.AddParameter("client_secret", "");
request.AddParameter("scope", "organization");
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://auth.catenatelematics.com/realms/catena/protocol/openid-connect/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 => "grant_type=client_credentials&client_id=&client_secret=&scope=organization",
CURLOPT_HTTPHEADER => [
"Content-Type: application/x-www-form-urlencoded"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"access_token": "eyJhbGciOiJIUzUxMiIsInR5cCIgOiAiS...",
"expires_in": 123,
"token_type": "Bearer",
"refresh_expires_in": 123,
"session_state": "123e4567-e89b-12d3-a456-426614174000",
"not-before-policy": 0,
"scope": "fleet:read share-agreement:read telematics:read"
}Body
application/x-www-form-urlencoded
Grant type for token request. Must be "client_credentials"
Allowed value:
"client_credentials"Your client identifier
Example:
""
Your client secret
Example:
""
Required scope for API access. Must be "organization"
Allowed value:
"organization"Response
Token response
OAuth2 token response from Keycloak.
Example:
"eyJhbGciOiJIUzUxMiIsInR5cCIgOiAiS..."
Example:
"Bearer"
Example:
"123e4567-e89b-12d3-a456-426614174000"
Example:
0
Example:
"fleet:read share-agreement:read telematics:read"
Was this page helpful?
⌘I