API authentication
To make requests to the Catalog APIs, you need to generate a bearer token.
Development environment
To generate a token for use with the development environment, use the following properties:
- "instacart_development_domain" is
https://connect.dev.instacart.tools
- "client_id" and "client_secret" are the credentials that Instacart provided to you
- "grant_type" is
client_credentials
- "scope" is
connect:data_ingestion
curl --request POST \
--url 'https://<instacart_development_domain>/v2/oauth/token' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"client_id": "<client_id>",
"client_secret": "<client_secret>",
"grant_type": "client_credentials"
"scope": "connect:data_ingestion"
}'
The response contains the generated token.
{
"access_token": "<your_access_token>",
"token_type": "Bearer",
"expires_in": 86400,
"scope": "connect:data_ingestion",
"created_at": 1603897760
}
note
The token is valid for 24 hours. During this period, reuse the same token in your requests. After 24 hours, you must generate a new token.
Production environment
To generate a token for use with the production environment, change "<instacart_development_domain>" to the production server: https://connect.instacart.com
.