Get Access Token
  • 20 Dec 2023
  • 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.).


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

OAuth grant type, always set to 'client_credentials'

Valid values[ "client_credentials" ]
client_id
string Required

Client ID associated with the API Client Credentials

client_secret
string Required

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?