Get Access Token
  • 04 Jul 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.


Security
HTTP
Type bearer

For more details about Administration API Authentication, check out the Authentication APIs documentation. Provide your bearer token in the Authorization header when making requests to protected resources. Example: Authorization: Bearer 123

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

Client ID associated with the API Client Credentials

client_secret
string

Client Secret associated with the API Client Credentials

grant_type
string

OAuth grant type, always set to 'client_credentials'

Valid values[ "client_credentials" ]
Responses
200

Successful Operation

object
access_token
string

OAuth Access Token

expires_in
integer (long)

Token Duration in seconds.

Example86400
token_type
string

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

ExampleBearer
401

Unauthorized


Was this article helpful?