API allowing an identified partner to obtain tokens enabling them to call other Ciss APIs.
To authenticate yourself on our API, you must use your client ID and an access token as your password.
To send an authentication request, you must include the “Authorization” header in your HTTP request.
The authorization header must contain the word “Basic” followed by a space and the Base64-encoded authentication credentials.
Here is an example of an authorization header:
Authorization: Basic Mzg2MmRiMmUtNGNkYi00ZDQ1LWFiYzMtYWMwNjdlZWUyY2M5OiQyeSQxMCRWVmguTms4UmcyZzZNeVZQTldSVDUuS1MuQmhYaWxuc1JSaVVaZDNPVnVqWHlPRWlKdHNrYQ==
Here is an example of implementation using PHP
<?php
// Replace YOUR_CLIENT_ID and YOUR_ACCESS_TOKEN with your authentication credentials.
$username = 'YOUR_CLIENT_ID';
$password = 'YOUR_ACCESS_TOKEN';
// Create the Base64-encoded authentication credential string
$auth_string = $username . ':' . $password;
$auth_header = 'Authorization: Basic ' . base64_encode($auth_string);
// Create a new Guzzle client
$client = new GuzzleHttp\Client();
// Define the query options
$options = [
'headers' => [
'Authorization' => $auth_header
]
];
// Send the request and retrieve the response
try {
$response = $client->get('https://authapi.ciss.fr/', $options);
// Process the response
echo 'Response : ' . $response->getBody();
} catch (GuzzleHttp\Exception\RequestException $e) {
// Handle the error
echo 'Erreur de requête : ' . $e->getMessage();
}
?>
Here is the list of error codes
| Code | Description | HTTP status |
|---|---|---|
| AUTH-1 | The credentials provided are incorrect. | 401 |
| AUTH-2 | Missing “Authorization” header | 401 |
| AUTH-3 | Invalid “Authorization” header | 401 |
| AUTH-6 | A parameter is missing or invalid in the body of the request (e.g., parameter sent as a string instead of an integer). | 422 |
| AUTH-7 | One of the scopes provided is not authorized. | 403 |
| AUTH-9 | The token does not have the correct type | 400 |
| AUTH-10 | Invalid token signature | 400 |
| AUTH-11 | Token expired | 400 |
| AUTH-12 | Invalid token | 404 |
Here is the list of internal error codes. These errors only appear in the context of an HTTP 500 status.
| Code | HTTP status |
|---|---|
| AUTH-4 | 500 |
| AUTH-5 | 500 |
| AUTH-8 | 500 |
| api_name required | string Example: api_name=onboarding The name of the API for which we want the uses |
| start_date required | string Example: start_date=2025-01-01 The start date of usage |
| end_date required | string Example: end_date=2025-01-01 The end date of usage |
{- "api": "string",
- "start_date": "string",
- "end_date": "string",
- "clients": [
- {
- "client_id": "string",
- "products": [
- {
- "product": "access",
- "label": "api onboarding access",
- "quantities": 200
}
]
}
]
}