Authentication
All protected SmartGarant API requests require a JWT access token in the Authorization header.
Prerequisite
Create your API credentials first. See Getting Started for API key setup and environment selection.
1. Authentication Flow
Use this sequence for all integrations:
- Request an access token with your
userNameandpassword. - Call protected endpoints with
Authorization: Bearer <token>. - Refresh your token when it expires.
2. Get a Token
Endpoint:
POST /v1/identity/token
- Sandbox example:
https://sandbox.api.smart-garant.fr/v1/identity/token
Request body example:
{
"userName": "data0234u2@example.fr",
"password": "123456789"
}
Response example:
{
"token": "eyJhbGciOi...",
"refreshToken": "R0FLglR84kGBVexLtVfkpgxxtc4oxZha4E2ctaUp",
"utcExpireDate": "2026-07-07T14:50:54.2987301Z"
}
:::warning ⚠️ IMPORTANT ⚠️ If you receive the following response when connecting, even after creating your API key:
{
"message": "User do not exist",
"errorCode": "E0009"
}
- Please email support@smart-garant.com.
- Your account must be validated internally. :::
Token Lifetime
Access tokens are valid for 1 hour.
3. Refresh a Token
Endpoint:
POST /v1/identity/refreshToken
- Sandbox example:
https://sandbox.api.smart-garant.fr/v1/identity/refreshToken
Request body example:
{
"userName": "data0234u2@example.fr",
"refreshToken": "dRGONYuf339o1GnlR9cufXXMr3BZuJyNeR9cOe"
}
Token Lifetime
A refreshed access token is also valid for 1 hour.
4. Bearer Token Usage
All protected requests must include this header:
Authorization: Bearer <jwt_token>
Example protected request:
POST /v3/score HTTP/1.1
Host: sandbox.api.smart-garant.fr
Authorization: Bearer {bearerToken}
Content-Type: application/json
{
"finance": {
"status": 1,
"monthlyIncome": 1200
},
"referentFinance": {
"status": 1,
"monthlyIncome": 1200
}
}
References
- Token endpoint reference: https://smartgarant.readme.io/reference/post_v1-identity-token
- Refresh endpoint reference: https://smartgarant.readme.io/reference/post_v1-identity-refreshtoken