curl --request POST \
--url https://api-sandbox.finogates.com/v1/platform/auth/token \
--header 'Content-Type: application/json' \
--data '
{
"client_id": "cl_aBcDeFgHiJkLmNoPqRsTuV",
"client_secret": "sk_aBcDeFgHiJkLmNoPqRsTuVwXyZaBcDeFgHiJkLmNoPqRsTuVwXyZ"
}
'import requests
url = "https://api-sandbox.finogates.com/v1/platform/auth/token"
payload = {
"client_id": "cl_aBcDeFgHiJkLmNoPqRsTuV",
"client_secret": "sk_aBcDeFgHiJkLmNoPqRsTuVwXyZaBcDeFgHiJkLmNoPqRsTuVwXyZ"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
client_id: 'cl_aBcDeFgHiJkLmNoPqRsTuV',
client_secret: 'sk_aBcDeFgHiJkLmNoPqRsTuVwXyZaBcDeFgHiJkLmNoPqRsTuVwXyZ'
})
};
fetch('https://api-sandbox.finogates.com/v1/platform/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://api-sandbox.finogates.com/v1/platform/auth/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 => json_encode([
'client_id' => 'cl_aBcDeFgHiJkLmNoPqRsTuV',
'client_secret' => 'sk_aBcDeFgHiJkLmNoPqRsTuVwXyZaBcDeFgHiJkLmNoPqRsTuVwXyZ'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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-sandbox.finogates.com/v1/platform/auth/token"
payload := strings.NewReader("{\n \"client_id\": \"cl_aBcDeFgHiJkLmNoPqRsTuV\",\n \"client_secret\": \"sk_aBcDeFgHiJkLmNoPqRsTuVwXyZaBcDeFgHiJkLmNoPqRsTuVwXyZ\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
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-sandbox.finogates.com/v1/platform/auth/token")
.header("Content-Type", "application/json")
.body("{\n \"client_id\": \"cl_aBcDeFgHiJkLmNoPqRsTuV\",\n \"client_secret\": \"sk_aBcDeFgHiJkLmNoPqRsTuVwXyZaBcDeFgHiJkLmNoPqRsTuVwXyZ\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.finogates.com/v1/platform/auth/token")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"client_id\": \"cl_aBcDeFgHiJkLmNoPqRsTuV\",\n \"client_secret\": \"sk_aBcDeFgHiJkLmNoPqRsTuVwXyZaBcDeFgHiJkLmNoPqRsTuVwXyZ\"\n}"
response = http.request(request)
puts response.read_body{
"status_code": 200,
"data": {
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"token_type": "bearer",
"mode": "sandbox"
},
"query_generated_time": 1712847600000
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Exchange Client Token
Exchange your client credentials for a Bearer access token using the OAuth2
client-credentials grant. Every other Platform API endpoint requires this
token, sent as an Authorization: Bearer <access_token> header.
Request body
| Field | Description |
|---|---|
client_id | Your client identifier, issued at onboarding. |
client_secret | The matching secret. Shown only once at creation or rotation — store it securely and never expose it in client-side code. |
Response
On success, data.access_token is a signed JWT. By default the token is
non-expiring (expires_in is null): the same Bearer value stays valid
until you rotate the issuing client_secret, mirroring Stripe Connect OAuth2
semantics. Rotating the secret immediately invalidates every token previously
issued for that client on its next request.
If the deployment is configured with a fixed token TTL
(CLIENT_ACCESS_TOKEN_EXPIRE_MINUTES), expires_in instead returns the
token lifetime in seconds and you should refresh before it elapses.
Integration notes
- This is the only endpoint that does not require an existing token — it bootstraps the credential used by every other call.
- Sandbox and production are fully isolated. The host you call determines
the environment, and your credentials must belong to that environment — a
sandbox
client_idcannot mint a production token, and vice versa. - If an IP allowlist is configured for your client, requests from any other source IP are rejected.
- Repeated failed attempts are rate-limited and may temporarily lock the client, so back off and retry after a delay rather than hammering the endpoint.
curl --request POST \
--url https://api-sandbox.finogates.com/v1/platform/auth/token \
--header 'Content-Type: application/json' \
--data '
{
"client_id": "cl_aBcDeFgHiJkLmNoPqRsTuV",
"client_secret": "sk_aBcDeFgHiJkLmNoPqRsTuVwXyZaBcDeFgHiJkLmNoPqRsTuVwXyZ"
}
'import requests
url = "https://api-sandbox.finogates.com/v1/platform/auth/token"
payload = {
"client_id": "cl_aBcDeFgHiJkLmNoPqRsTuV",
"client_secret": "sk_aBcDeFgHiJkLmNoPqRsTuVwXyZaBcDeFgHiJkLmNoPqRsTuVwXyZ"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
client_id: 'cl_aBcDeFgHiJkLmNoPqRsTuV',
client_secret: 'sk_aBcDeFgHiJkLmNoPqRsTuVwXyZaBcDeFgHiJkLmNoPqRsTuVwXyZ'
})
};
fetch('https://api-sandbox.finogates.com/v1/platform/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://api-sandbox.finogates.com/v1/platform/auth/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 => json_encode([
'client_id' => 'cl_aBcDeFgHiJkLmNoPqRsTuV',
'client_secret' => 'sk_aBcDeFgHiJkLmNoPqRsTuVwXyZaBcDeFgHiJkLmNoPqRsTuVwXyZ'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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-sandbox.finogates.com/v1/platform/auth/token"
payload := strings.NewReader("{\n \"client_id\": \"cl_aBcDeFgHiJkLmNoPqRsTuV\",\n \"client_secret\": \"sk_aBcDeFgHiJkLmNoPqRsTuVwXyZaBcDeFgHiJkLmNoPqRsTuVwXyZ\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
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-sandbox.finogates.com/v1/platform/auth/token")
.header("Content-Type", "application/json")
.body("{\n \"client_id\": \"cl_aBcDeFgHiJkLmNoPqRsTuV\",\n \"client_secret\": \"sk_aBcDeFgHiJkLmNoPqRsTuVwXyZaBcDeFgHiJkLmNoPqRsTuVwXyZ\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.finogates.com/v1/platform/auth/token")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"client_id\": \"cl_aBcDeFgHiJkLmNoPqRsTuV\",\n \"client_secret\": \"sk_aBcDeFgHiJkLmNoPqRsTuVwXyZaBcDeFgHiJkLmNoPqRsTuVwXyZ\"\n}"
response = http.request(request)
puts response.read_body{
"status_code": 200,
"data": {
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"token_type": "bearer",
"mode": "sandbox"
},
"query_generated_time": 1712847600000
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Body
OAuth2 client-credentials token exchange request.
Client identifier issued during onboarding.
5 - 120"cl_aBcDeFgHiJkLmNoPqRsTuV"
Client secret issued during onboarding. Shown only once at creation or rotation.
10 - 255"sk_aBcDeFgHiJkLmNoPqRsTuVwXyZaBcDeFgHiJkLmNoPqRsTuVwXyZ"
Response
Access token issued.
Standard response wrapper for single-object responses and errors.
Generic over the payload type. A route that declares
CommonResponse[SomeModel] gets the real data schema rendered in
OpenAPI/Swagger; a bare CommonResponse leaves data untyped.

