v1

latestOpenAPI 3.0.3Apache 2.02026-07-2685172326.0 KB
OAuth

Create 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

Headers

X-Pinecone-Api-Versionstring required

Required date-based version header

Request body

client_idstring required

The service account's client ID.

client_secretstring required

The service account's client secret.

grant_typestring required

The type of grant to use.

audiencestring required

The audience for the token.

Example request

{
  "audience": "https://api.pinecone.io/",
  "client_id": "I1r8m4i6jX9JTFYk0t3q85HWzciEgcA5",
  "client_secret": "EriX...j2ci",
  "grant_type": "client_credentials"
}

Response

A response that contains the access token.

access_tokenstring required

The access token.

token_typestring required

The type of token. Possible values: Bearer.

expires_ininteger required

The number of seconds until the token expires.

Example response

{
  "access_token": "eyJz93a...k4laUWw",
  "expires_in": 1800,
  "token_type": "Bearer"
}