Get the access token for client credentials (GET alias)
curl --request GET \
--url https://data.leadinfo.com/v1/auth/tokenimport requests
url = "https://data.leadinfo.com/v1/auth/token"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://data.leadinfo.com/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://data.leadinfo.com/v1/auth/token",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://data.leadinfo.com/v1/auth/token"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://data.leadinfo.com/v1/auth/token")
.asString();require 'uri'
require 'net/http'
url = URI("https://data.leadinfo.com/v1/auth/token")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"access_token": "<string>",
"expires_in": 123,
"token_type": "Bearer",
"scope": "<string>"
}auth
Get the access token for client credentials (GET alias)
Exchange X-Client-ID + X-Client-Secret headers for an OAuth2 Bearer access token. This is the only endpoint in the public API that accepts client credentials directly — every other endpoint requires the resulting Authorization: Bearer <token> header.
A client has one valid token at a time: while its token is valid, every call returns that same token with the seconds it has left in expires_in; a new token is issued only once it has expired. Cache the token and call this endpoint again when it expires.
The token carries the scope configured for the client in oauth_clients — callers do not choose scopes. The granted scope is returned in the response.
Kept for existing integrations; prefer POST.
GET
/
v1
/
auth
/
token
Get the access token for client credentials (GET alias)
curl --request GET \
--url https://data.leadinfo.com/v1/auth/tokenimport requests
url = "https://data.leadinfo.com/v1/auth/token"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://data.leadinfo.com/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://data.leadinfo.com/v1/auth/token",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://data.leadinfo.com/v1/auth/token"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://data.leadinfo.com/v1/auth/token")
.asString();require 'uri'
require 'net/http'
url = URI("https://data.leadinfo.com/v1/auth/token")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"access_token": "<string>",
"expires_in": 123,
"token_type": "Bearer",
"scope": "<string>"
}Response
Successful Response
