Help
French and English coexist on this site
To provide the Sirene and nomenclature APIs for the general public, INSEE chose to rely on an open source solution initially in English. In order to accelerate the opening of the service, INSEE has preferred not to wait for the completion of all translation operations, resulting in the coexistence of both languages in certain pages of the site or certain messages. INSEE will correct this situation in the coming months. Please excuse us for this inconvenience.
Where to start to use an INSEE API ?
To use an INSEE API, you must respect several steps.
- You must have created an account using the button Sign Up
- Log in with the button Sign In
- On the page of the API that interests you, click on the Subscribe button
- Then you need to generate an access token, for that
-
On the window confirming your subscription, click on View subscriptions
-
Then click on the Generate Keys button
-
On the window confirming your subscription, click on View subscriptions
- With the keys, a first access token has been generated, and you can then use this access token to test the chosen API by returning to the API page and positioning yourself on the tab. API Console.
- Fill in the query parameters of the API and click on the button
To use the following API
- You must be logged in
- On the page of the API that interests you, click on the Subscribe button
- Click Stay on this page
- You will then be able to test the chosen API from the Console tab of the API, for which you will need a valid access token.
- Fill in the query parameters of the API and click on the button
What is the concept of application ?
An application is an API pool that you can access from the same access token. p>
There is a default application (named DefaultApplication) p>
But you can also register in this section an application for every application module that you develop, and declare for each of them one or more INSEE APIs that they are querying: the application that subscribes to an API, and not the user account. p>
Thus, a user account can have one or more applications, and each application can subscribe to one or more APIs. p>
What is the purpose of My Apps ?
The My Applications section allows you to create new applications, manage the applications you have declared. p>
From this screen you will be able to unregister one of your applications from an API. < / p>
It is also possible to delete an application, in which case all subscriptions are canceled and its token is automatically invalidated. p>
What is an access token ?
An access token is a string supplied by the INSEE API catalog, which is to be used as a parameter for each API call and allows you to identify yourself. p> p> p> To use an API, you need a valid access token By default, a token has a validity period of one week. p>
A token is associated with an application. query all APIs that the application has subscribed to. p>
How to generate your first access token ?
See step number 4 of « Where to start to use an INSEE API? »
How to renew my access token ?
Tokens are valid for one week by default. p>
Renewal can be done: p>
-
Manually from the application page on this site
By calling the access token generation API (see the application page for more details)
The token command allows to :
- generate a token if you do not have one. It is possible to add in the body of the request the validity_period parameter to indicate in seconds the desired duration of validity of the token.
- the current token if it already exists.
The revoke command allows you to revoke the current token.