PINECONE_CLIENT_ID="YOUR_CLIENT_ID"
PINECONE_CLIENT_SECRET="YOUR_CLIENT_SECRET"
# Note the base URL: login.pinecone.io
curl -X POST "https://login.pinecone.io/oauth/token" \
-H "X-Pinecone-Api-Version: 2025-04" \
-H "Content-Type: application/json" \
-d "{
\"grant_type\": \"client_credentials\",
\"client_id\": \"$PINECONE_CLIENT_ID\",
\"client_secret\": \"$PINECONE_CLIENT_SECRET\",
\"audience\": \"https://api.pinecone.io/\"
}"
{
"access_token":"YOUR_ACCESS_TOKEN",
"expires_in":86400,
"token_type":"Bearer"
}
Service accounts
Get an access token
Obtain an access token for a service account using the OAuth2 client credentials flow. An access token is needed to authorize requests to the Pinecone Admin API.
The host domain for OAuth endpoints is login.pinecone.io.
POST
/
oauth
/
token
PINECONE_CLIENT_ID="YOUR_CLIENT_ID"
PINECONE_CLIENT_SECRET="YOUR_CLIENT_SECRET"
# Note the base URL: login.pinecone.io
curl -X POST "https://login.pinecone.io/oauth/token" \
-H "X-Pinecone-Api-Version: 2025-04" \
-H "Content-Type: application/json" \
-d "{
\"grant_type\": \"client_credentials\",
\"client_id\": \"$PINECONE_CLIENT_ID\",
\"client_secret\": \"$PINECONE_CLIENT_SECRET\",
\"audience\": \"https://api.pinecone.io/\"
}"
{
"access_token":"YOUR_ACCESS_TOKEN",
"expires_in":86400,
"token_type":"Bearer"
}
PINECONE_CLIENT_ID="YOUR_CLIENT_ID"
PINECONE_CLIENT_SECRET="YOUR_CLIENT_SECRET"
# Note the base URL: login.pinecone.io
curl -X POST "https://login.pinecone.io/oauth/token" \
-H "X-Pinecone-Api-Version: 2025-04" \
-H "Content-Type: application/json" \
-d "{
\"grant_type\": \"client_credentials\",
\"client_id\": \"$PINECONE_CLIENT_ID\",
\"client_secret\": \"$PINECONE_CLIENT_SECRET\",
\"audience\": \"https://api.pinecone.io/\"
}"
{
"access_token":"YOUR_ACCESS_TOKEN",
"expires_in":86400,
"token_type":"Bearer"
}
Body
application/jsonapplication/x-www-form-urlencoded
A request to exchange client credentials for an access token.
A request to obtain an access token.
The service account's client ID.
The service account's client secret.
The type of grant to use.
Available options:
client_credentials The audience for the token.
Available options:
https://api.pinecone.io/ Was this page helpful?
⌘I