API key token (V2)
curl --request POST \
--url https://api.telemax.com.au/v2/api/authentication/token/api-key \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data apiKey=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxximport requests
url = "https://api.telemax.com.au/v2/api/authentication/token/api-key"
payload = { "apiKey": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" }
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({apiKey: 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'})
};
fetch('https://api.telemax.com.au/v2/api/authentication/token/api-key', 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.telemax.com.au/v2/api/authentication/token/api-key",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "apiKey=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
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;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.telemax.com.au/v2/api/authentication/token/api-key"
payload := strings.NewReader("apiKey=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx")
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))
}HttpResponse<String> response = Unirest.post("https://api.telemax.com.au/v2/api/authentication/token/api-key")
.header("Content-Type", "application/x-www-form-urlencoded")
.body("apiKey=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.telemax.com.au/v2/api/authentication/token/api-key")
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 = "apiKey=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
response = http.request(request)
puts response.read_body{
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"token_type": "bearer",
"expires_in": 86399
}{
"type": "AUTHENTICATION",
"code": "INVALID_CREDENTIALS",
"description": "The provided API key is invalid or does not exist.",
"requestId": "0HNLTALNU4DCO:00000004",
"docUrl": "https://docs.telemax.com.au/errors/invalid-credentials"
}{
"type": "VALIDATION_ERROR",
"code": "INVALID_INPUT",
"description": "One or more route or query parameters could not be parsed.",
"requestId": "req_9f3e7c1b",
"docUrl": "https://docs.telemax.com.au/errors/invalid-input"
}{
"type": "RATE_LIMIT",
"code": "RATE_LIMIT_EXCEEDED",
"description": "Too many requests. Please slow down.",
"requestId": "req_6d2f8b4a",
"docUrl": "https://docs.telemax.com.au/errors/rate-limit-exceeded"
}{
"type": "SERVER_ERROR",
"code": "INTERNAL_SERVER_ERROR",
"description": "An unexpected error occurred. Please try again later.",
"requestId": "req_1e5a3c7d",
"docUrl": "https://docs.telemax.com.au/errors/internal-server-error"
}Authentication
API key token
Exchange a company API key for a JWT.
POST
/
v2
/
api
/
authentication
/
token
/
api-key
API key token (V2)
curl --request POST \
--url https://api.telemax.com.au/v2/api/authentication/token/api-key \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data apiKey=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxximport requests
url = "https://api.telemax.com.au/v2/api/authentication/token/api-key"
payload = { "apiKey": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" }
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({apiKey: 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'})
};
fetch('https://api.telemax.com.au/v2/api/authentication/token/api-key', 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.telemax.com.au/v2/api/authentication/token/api-key",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "apiKey=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
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;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.telemax.com.au/v2/api/authentication/token/api-key"
payload := strings.NewReader("apiKey=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx")
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))
}HttpResponse<String> response = Unirest.post("https://api.telemax.com.au/v2/api/authentication/token/api-key")
.header("Content-Type", "application/x-www-form-urlencoded")
.body("apiKey=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.telemax.com.au/v2/api/authentication/token/api-key")
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 = "apiKey=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
response = http.request(request)
puts response.read_body{
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"token_type": "bearer",
"expires_in": 86399
}{
"type": "AUTHENTICATION",
"code": "INVALID_CREDENTIALS",
"description": "The provided API key is invalid or does not exist.",
"requestId": "0HNLTALNU4DCO:00000004",
"docUrl": "https://docs.telemax.com.au/errors/invalid-credentials"
}{
"type": "VALIDATION_ERROR",
"code": "INVALID_INPUT",
"description": "One or more route or query parameters could not be parsed.",
"requestId": "req_9f3e7c1b",
"docUrl": "https://docs.telemax.com.au/errors/invalid-input"
}{
"type": "RATE_LIMIT",
"code": "RATE_LIMIT_EXCEEDED",
"description": "Too many requests. Please slow down.",
"requestId": "req_6d2f8b4a",
"docUrl": "https://docs.telemax.com.au/errors/rate-limit-exceeded"
}{
"type": "SERVER_ERROR",
"code": "INTERNAL_SERVER_ERROR",
"description": "An unexpected error occurred. Please try again later.",
"requestId": "req_1e5a3c7d",
"docUrl": "https://docs.telemax.com.au/errors/internal-server-error"
}Overview
Exchanges a Telemax company API key for a signed JWT. Use this for server-to-server integrations where no user identity is required.This endpoint replaces V1 API key token.
Endpoint
POST /v2/api/authentication/token/api-key
Authentication
Not required (public endpoint).Request headers
| Header | Required | Value |
|---|---|---|
| Content-Type | Yes | application/x-www-form-urlencoded |
Request body (form)
string
required
Company API key (43 characters, issued from the Telemax dashboard).
Response
200 OK —JwtTokenResponse
| Field | Type | Description |
|---|---|---|
| access_token | string | Bearer token for subsequent API calls |
| token_type | string | Always bearer |
| expires_in | number | Token lifetime in seconds |
Example response
{
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"token_type": "bearer",
"expires_in": 86399.0
}
Error responses
| Status | Meaning |
|---|---|
| 401 | Invalid or unrecognised API key |
curl -X POST "https://api.telemax.com.au/v2/api/authentication/token/api-key" \
-H "Content-Type: application/x-www-form-urlencoded" \
--data-urlencode "apiKey=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
await fetch("https://api.telemax.com.au/v2/api/authentication/token/api-key", {
method: "POST",
headers: { "Content-Type": "application/x-www-form-urlencoded" },
body: new URLSearchParams({ apiKey: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" }),
});
import requests
r = requests.post(
"https://api.telemax.com.au/v2/api/authentication/token/api-key",
data={"apiKey": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"},
)
token = r.json()["access_token"]
Body
application/x-www-form-urlencoded
Example:
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
Response
Successful response
Was this page helpful?
⌘I