Get Access Token
  • 25 Dec 2024
  • 1 Minute to read
  • Dark
    Light
  • PDF

Get Access Token

  • Dark
    Light
  • PDF

Article summary

Post
/api/1.0/api-key/token

This API enables users to get an Access Token for API Client Credentials associated with a particular Client. PlainID uses the API Client Credentials to support secure access to Management using an OAuth Client Credential flow.

Notice

Accessing the Policy Management APIs is through a dedicated domain/URL according to your PlainID Tenant Location:
https://api.{REGION}.plainid.io

United States (US) - https://api.us1.plainid.io
Canada (US) - https://api.ca1.plainid.io
Europe (US) - https://api.eu1.plainid.io

Replace{REGION} with your PlainID Tenant region (e.g. us1, eu1, ca1, etc.).



cURL Sample Guidelines

In order for the relevant parameters to appear in the cURL sample, you can input the values in the interactive API console on the right. They will then appear in the cURL sample on the bottom of the page in the correct format.


Body parameters
Sample Get token
{
  "grant_type": "client_credentials",
  "client_id": "PVNTYSTFE2L9R4OJ9YY5",
  "client_secret": "2TdbqLnCyUAAKhj6AcFVuSDDkXRACTYdabcd"
}
object
grant_type
string

OAuth grant type, always set to 'client_credentials'

Valid values[ "client_credentials" ]
client_id
string

Client ID associated with the API Client Credentials

client_secret
string

Client Secret associated with the API Client Credentials

Responses
200

Successful Operation

object
access_token
string

OAuth Access Token

token_type
string

Token Type as OAuth standard, always set to 'Bearer'.

ExampleBearer
expires_in
integer (long)

Token Duration in seconds.

Example86400
401

Unauthorized


Was this article helpful?