Skip to main content
POST
Create access token
Exchange SDK credentials for a Core API bearer token. Use HTTP Basic authentication with your client ID and secret, and send grant_type=client_credentials as form data. Cache the returned token and use expires_in to schedule renewal. Do not request a new token for every API call. Keep the client secret and access token on a trusted server. Platform API keys and embed publishable keys are different credential types. JavaScript, PHP and Next.js can manage this exchange for you; see Choose an SDK.

Authorizations

Authorization
string
header
required

HTTP Basic authentication using client_id:client_secret for token exchange.

Body

application/x-www-form-urlencoded
grant_type
enum<string>
required
Available options:
client_credentials
scope
string

Space-delimited OAuth scopes. Omit to use the scopes configured for the client.

Example:

"neuronsearchlab-api/read neuronsearchlab-api/write"

Response

Access token

access_token
string
required

Bearer token to send in the Authorization header.

expires_in
integer
required

Token lifetime in seconds.

Example:

3600

token_type
enum<string>
required
Available options:
Bearer
scope
string
Example:

"neuronsearchlab-api/read neuronsearchlab-api/write"