cURL
curl --request POST \
--url https://public.api.live.turrisfi.com/v1/auth/jwt \
--header 'Content-Type: application/json' \
--data '
{
"clientId": "m2m-client-abc123",
"clientSecret": "your-client-secret"
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({clientId: 'm2m-client-abc123', clientSecret: 'your-client-secret'})
};
fetch('https://public.api.live.turrisfi.com/v1/auth/jwt', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://public.api.live.turrisfi.com/v1/auth/jwt"
payload = {
"clientId": "m2m-client-abc123",
"clientSecret": "your-client-secret"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"data": {
"accessToken": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...",
"expiresIn": 3600,
"tokenType": "Bearer"
},
"requestId": "dev-2c5e7cf2-9acf-4c8c-ab2f-b81f39d775a8",
"timestamp": "2025-11-12T20:49:03.293Z"
}{
"statusCode": 123,
"requestId": "<string>",
"errorType": "validation_error",
"errorMessage": [
"<string>"
],
"timestamp": "<string>",
"details": {}
}{
"statusCode": 123,
"requestId": "<string>",
"errorType": "validation_error",
"errorMessage": [
"<string>"
],
"timestamp": "<string>",
"details": {}
}Shared Endpoints
Get OAuth Token
Exchange client credentials for a JWT access token
POST
/
v1
/
auth
/
jwt
cURL
curl --request POST \
--url https://public.api.live.turrisfi.com/v1/auth/jwt \
--header 'Content-Type: application/json' \
--data '
{
"clientId": "m2m-client-abc123",
"clientSecret": "your-client-secret"
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({clientId: 'm2m-client-abc123', clientSecret: 'your-client-secret'})
};
fetch('https://public.api.live.turrisfi.com/v1/auth/jwt', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://public.api.live.turrisfi.com/v1/auth/jwt"
payload = {
"clientId": "m2m-client-abc123",
"clientSecret": "your-client-secret"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"data": {
"accessToken": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...",
"expiresIn": 3600,
"tokenType": "Bearer"
},
"requestId": "dev-2c5e7cf2-9acf-4c8c-ab2f-b81f39d775a8",
"timestamp": "2025-11-12T20:49:03.293Z"
}{
"statusCode": 123,
"requestId": "<string>",
"errorType": "validation_error",
"errorMessage": [
"<string>"
],
"timestamp": "<string>",
"details": {}
}{
"statusCode": 123,
"requestId": "<string>",
"errorType": "validation_error",
"errorMessage": [
"<string>"
],
"timestamp": "<string>",
"details": {}
}Exchange your client ID and client secret for a JWT access token that can be used to authenticate subsequent API requests.
Rate Limited: This endpoint is rate-limited. You should cache the returned token and reuse it until it expires (60 minutes).
Token Lifecycle
- Request a token using your client credentials
- Use the token in the
Authorization: Bearer <token>header - Token expires after 60 minutes
- Request a new token before expiration
Example Usage
const response = await fetch('https://public.api.live.turrisfi.com/v1/auth/jwt', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
client_id: 'your-client-id',
client_secret: 'your-client-secret'
})
});
const { access_token } = await response.json();
Body
application/json
Was this page helpful?