Get started with testing
To make requests to the Sandbox API, you need a bearer token with the client_credentials
grant type. To generate the token, use the authentication endpoint and specify your client ID and secret in the body.
curl --request POST \
--url 'https://<instacart_development_domain>/v2/oauth/token' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"client_id": "<your_client_id>",
"client_secret": "<your_client_secret>",
"grant_type": "client_credentials"
}'
The response contains the generated access token.
{
"access_token": "xwnV1ncCrLLK-Y7TNyPyEL-ovT6vPGLmwGrmJWqvozE",
"token_type": "Bearer",
"expires_in": 86400,
"scope": "connect:fulfillment",
"created_at": 1630091524
}
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.
Now you can test the workflows: