The accounting firm is always derived from the ID token.
You never send it as a parameter: a user only ever sees their own firm’s data.
User accounts and token scope
The credentials you send toPOST /token belong to a Codaclean user account.
The accounting firm creates and manages these accounts itself in its MyCodaclean platform. It chooses each user’s access level and which customers they can access.
An ID token therefore gives access to exactly what its user can access:
- Usually, the whole accounting firm. The token gives access to all the firm’s customers the user can see.
- Or only one or more companies. The accounting firm can restrict a user to specific customers. The API then only returns those customers, with their mandates and files.
Get an ID token
CallPOST /token with the user’s credentials:
The response contains:
Refresh the ID token
The ID token is valid for 1 hour. When it expires, calls return401.
Call POST /token again with the refresh token only:
The response contains a new
idToken. It does not contain a new refreshToken: keep using the one you have.
The refresh token is valid for 30 days. When it expires, log in again with the username and password.
Token errors
On this endpoint, a
500 usually means wrong credentials or an invalid refresh token, not a server failure.Who can use the API
- Users with the Portal only access level cannot use the API: their calls return
401. - Users without the Administrator access level do not see confidential customers.
- Scopes control what your API key can do.

