Getting Started
Welcome to the Chorus Pro API documentation. This guide will help you get started with the API, understand authentication methods, and make your first request.
Base URLs
The Chorus Pro API is available on the following environments:
Production
https://api.piste.gouv.fr/cprohttps://oauth.piste.gouv.frProduction environment for live requests with real data.
Sandbox
https://sandbox-api.piste.gouv.fr/cprohttps://sandbox-oauth.piste.gouv.frSandbox environment for development and testing.
Authentication Methods
The Chorus Pro API requires 2 authentication methods:
OAuth 2.0 (Bearer Token)
OAuth 2.0 token obtained via client_credentials grant. Required for all API requests.
Authorization: Bearer YOUR_OAUTH_TOKENcpro-account Header
Chorus Pro account credentials encoded in base64 as 'login:password'.
cpro-account: base64(login:password)1. Get an OAuth 2.0 Token
Before making requests, you must obtain an OAuth 2.0 token:
# Production
curl -X POST "https://oauth.piste.gouv.fr/api/oauth/token" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "grant_type=client_credentials" \
-d "client_id=YOUR_CLIENT_ID" \
-d "client_secret=YOUR_CLIENT_SECRET" \
-d "scope=openid resource.READ"
# Sandbox
curl -X POST "https://sandbox-oauth.piste.gouv.fr/api/oauth/token" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "grant_type=client_credentials" \
-d "client_id=YOUR_CLIENT_ID" \
-d "client_secret=YOUR_CLIENT_SECRET" \
-d "scope=openid resource.READ"2. Making Your First Request
Here's an example request to check the API health:
# Production
curl -X GET "https://api.piste.gouv.fr/cpro/transverses/v1/health-check" \
-H "Authorization: Bearer YOUR_OAUTH_TOKEN" \
-H "cpro-account: $(echo -n 'login:password' | base64)" \
-H "Content-Type: application/json"
# Sandbox
curl -X GET "https://sandbox-api.piste.gouv.fr/cpro/transverses/v1/health-check" \
-H "Authorization: Bearer YOUR_OAUTH_TOKEN" \
-H "cpro-account: $(echo -n 'login:password' | base64)" \
-H "Content-Type: application/json"β οΈ Important: All requests require TWO authentications: the OAuth 2.0 token AND the cpro-account header.
Important Notes
π POST Method for Everything
The Chorus Pro API uses the POST method for almost all operations, even for data retrieval. Badge colors help you identify the operation type (read in green, create in blue).
π Dual Authentication
Each request requires both an OAuth 2.0 token (Authorization Bearer) and a cpro-account header with your credentials encoded in base64.
β‘ Response Format
Responses typically include a 'codeRetour' field (0 = success) and a 'libelle' field with the message. Check the response examples for each endpoint.
Support & Resources
Need help? Check out these resources:
- πOfficial Chorus Pro documentation: portail.chorus-pro.gouv.fr/aife_documentation/
- πFull API documentation: Browse endpoints in the sidebar
- πGet API access: https://www.data.gouv.fr/dataservices/api-chorus-pro/
- β Create a technical account (for the identifier and password) : Tutoriel
Getting Started
Welcome to the Chorus Pro API documentation. This guide will help you get started with the API, understand authentication methods, and make your first request.
Base URLs
The Chorus Pro API is available on the following environments:
Production
https://api.piste.gouv.fr/cprohttps://oauth.piste.gouv.frProduction environment for live requests with real data.
Sandbox
https://sandbox-api.piste.gouv.fr/cprohttps://sandbox-oauth.piste.gouv.frSandbox environment for development and testing.
Authentication Methods
The Chorus Pro API requires 2 authentication methods:
OAuth 2.0 (Bearer Token)
OAuth 2.0 token obtained via client_credentials grant. Required for all API requests.
Authorization: Bearer YOUR_OAUTH_TOKENcpro-account Header
Chorus Pro account credentials encoded in base64 as 'login:password'.
cpro-account: base64(login:password)1. Get an OAuth 2.0 Token
Before making requests, you must obtain an OAuth 2.0 token:
# Production
curl -X POST "https://oauth.piste.gouv.fr/api/oauth/token" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "grant_type=client_credentials" \
-d "client_id=YOUR_CLIENT_ID" \
-d "client_secret=YOUR_CLIENT_SECRET" \
-d "scope=openid resource.READ"
# Sandbox
curl -X POST "https://sandbox-oauth.piste.gouv.fr/api/oauth/token" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "grant_type=client_credentials" \
-d "client_id=YOUR_CLIENT_ID" \
-d "client_secret=YOUR_CLIENT_SECRET" \
-d "scope=openid resource.READ"2. Making Your First Request
Here's an example request to check the API health:
# Production
curl -X GET "https://api.piste.gouv.fr/cpro/transverses/v1/health-check" \
-H "Authorization: Bearer YOUR_OAUTH_TOKEN" \
-H "cpro-account: $(echo -n 'login:password' | base64)" \
-H "Content-Type: application/json"
# Sandbox
curl -X GET "https://sandbox-api.piste.gouv.fr/cpro/transverses/v1/health-check" \
-H "Authorization: Bearer YOUR_OAUTH_TOKEN" \
-H "cpro-account: $(echo -n 'login:password' | base64)" \
-H "Content-Type: application/json"β οΈ Important: All requests require TWO authentications: the OAuth 2.0 token AND the cpro-account header.
Important Notes
π POST Method for Everything
The Chorus Pro API uses the POST method for almost all operations, even for data retrieval. Badge colors help you identify the operation type (read in green, create in blue).
π Dual Authentication
Each request requires both an OAuth 2.0 token (Authorization Bearer) and a cpro-account header with your credentials encoded in base64.
β‘ Response Format
Responses typically include a 'codeRetour' field (0 = success) and a 'libelle' field with the message. Check the response examples for each endpoint.
Support & Resources
Need help? Check out these resources:
- πOfficial Chorus Pro documentation: portail.chorus-pro.gouv.fr/aife_documentation/
- πFull API documentation: Browse endpoints in the sidebar
- πGet API access: https://www.data.gouv.fr/dataservices/api-chorus-pro/
- β Create a technical account (for the identifier and password) : Tutoriel