Api documentation

Make your first call


In the rest of this documentation, we'll use the Postman tool to authenticate and connect to a Cegos API.
If you don't have it, you can download it from the official website.
You can also use any other tool you like.

Authenticate


Before requesting an API, you need to identify yourself and obtain a token. Launch Postman, create a new request and go to the "Authorization" tab.
Select Oauth 2.0 and enter the following values:

Grand Type: client Credentials
Access Token URL: https://api.cegos.fr/connect/token
Client Id: your_client_id
Client Secret: your_client_secret
Scope: api-cegos
Client Authentication: Send client credentials in body

As in the example below:

Click on "Get New Access Token".

If your request is successful, Postman will display a new window with details of the token obtained.

Click on "Use Token".
This action will allow you to use this token when requesting a Cegos API.

The token is valid for 1 hour.

Call a Cegos API


You can now call a Cegos API. For our example, we're going to retrieve the tree of training themes available on the Cegos.fr website.

We'll make a simple GET call to:
https://catalog.api.cegos.fr/v1/CatalogsTopics

No parameters are required for this call. You'll get a JSON response as shown below:

You are now able to interact with our APIs.