Skip to main content

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:

  1. Request an access token with your userName and password.
  2. Call protected endpoints with Authorization: Bearer <token>.
  3. 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"
}
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​