auth
Download SpecAccess Token Request https://tools.ietf.org/html/rfc6749. Supported grant types by OAuth domain:
- privx-external: client_credentials (requires privx-external.client_type="public")
grant_type
string
required
OAuth 2.0 grant type, RFC6749
- Enum
-
- client_credentials
client_id
string
API client or trusted client ID
- Example
- "api-client-id"
client_secret
string
API client or trusted client secret
- Example
- "api-client-secret"
domain
string
required
Authentication domain (equals Oauth Client ID). Currently only "privx-external" domain is supported.
Request
{
"grant_type": "client_credentials",
"client_id": "api-client-id",
"client_secret": "api-client-secret"
}
Response
Successful response, returns JSON object
{
"access_token": "eyJhbGciOiJFZDI1NTE5IiwidHlwIjoiSldUIn0=.eyJhdWQiOiJwcml2eC11aSIsImV4cCI6MTUyMjgzNjAxNSwiaWF0IjoxNTIyODM1NzE1LCJpc3MiOiJvYW0uYXV0aC5zc2guY29tIiwiZG9tYWluIjoicHJpdngtdWkiLCJwZXJtaXNzaW9ucyI6InByaXZ4LWFkbWluLHByaXZ4LXVzZXIiLCJzZXNzaW9uaWQiOiI4MWI2NjNiOC02Zjc5LTQ3ZjctNzY0Yy03MTdmMGEwNjk0MjYiLCJ1c2VyaWQiOiJhOGMyNjM5NS0zMmZjLTQxMjctYmRiNy04MDllZThhMjAzZjIifQ==.JM6RrCYg9djDnoJtRkAMAKvkM2Zm9dYuxgN1zZA7G1-XTCc4Iub_y6lKdhHnoRm_hUwW6QtRWm8IlAUayqs4Aw",
"token_type": "bearer",
"expires_in": 300,
"refresh_token": "I7SNNZH4GLZNCOIV7D6DKULPFXBWBD4TTZJ5KQDCO3N2W7D562WSE5QWSNQFO7OTG5VRGPDU73SEUR5NVTXLPNDV6TQD6OH6V7S3JNWNFSPZ3ARSSJKJO6MSPVHRY3OFFXN4YLRDZPODQCDW6UL27PLR2YWUOUHF5WBIKZVDR4H5R4VQSPPKBBJC4GWJ3XAPWZL4DBVT6YH6PVBWMOKJHDO66577OBJVOOKWAVY7JEFQTTZNRTNDXPHI42AGHMCNWHFBSG63PXSMO67YQJBC55CHAQQI3XS3ZUCQ",
"scope": "privx-user connections-manual"
}
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Bad request
{
"error": "invalid_request",
"error_description": "string"
}
Internal server error
{
"error": "invalid_request",
"error_description": "string"
}
error
string
required
Standard error code denoting the error type
- Enum
-
- invalid_request
- invalid_client
- invalid_grant
- unauthorized_client
- unsupported_grant_type
- invalid_scope
error_description
string
Textual, human readable error message
error
string
required
Standard error code denoting the error type
- Enum
-
- invalid_request
- invalid_client
- invalid_grant
- unauthorized_client
- unsupported_grant_type
- invalid_scope
error_description
string
Textual, human readable error message
access_token
string
OAuth2 access token
- Example
- "eyJhbGciOiJFZDI1NTE5IiwidHlwIjoiSldUIn0=.eyJhdWQiOiJwcml2eC11aSIsImV4cCI6MTUyMjgzNjAxNSwiaWF0IjoxNTIyODM1NzE1LCJpc3MiOiJvYW0uYXV0aC5zc2guY29tIiwiZG9tYWluIjoicHJpdngtdWkiLCJwZXJtaXNzaW9ucyI6InByaXZ4LWFkbWluLHByaXZ4LXVzZXIiLCJzZXNzaW9uaWQiOiI4MWI2NjNiOC02Zjc5LTQ3ZjctNzY0Yy03MTdmMGEwNjk0MjYiLCJ1c2VyaWQiOiJhOGMyNjM5NS0zMmZjLTQxMjctYmRiNy04MDllZThhMjAzZjIifQ==.JM6RrCYg9djDnoJtRkAMAKvkM2Zm9dYuxgN1zZA7G1-XTCc4Iub_y6lKdhHnoRm_hUwW6QtRWm8IlAUayqs4Aw"
token_type
string
Token type
- Example
- "bearer"
expires_in
int
Token expiration time in seconds.
- Example
- 300
refresh_token
string
Refresh token.
- Example
- "I7SNNZH4GLZNCOIV7D6DKULPFXBWBD4TTZJ5KQDCO3N2W7D562WSE5QWSNQFO7OTG5VRGPDU73SEUR5NVTXLPNDV6TQD6OH6V7S3JNWNFSPZ3ARSSJKJO6MSPVHRY3OFFXN4YLRDZPODQCDW6UL27PLR2YWUOUHF5WBIKZVDR4H5R4VQSPPKBBJC4GWJ3XAPWZL4DBVT6YH6PVBWMOKJHDO66577OBJVOOKWAVY7JEFQTTZNRTNDXPHI42AGHMCNWHFBSG63PXSMO67YQJBC55CHAQQI3XS3ZUCQ"
scope
string
Access Token Scope.
- Example
- "privx-user connections-manual"
Response
Successful response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
Empty response
No schema
Bad request
{
"error_code": "GENERAL_ERROR",
"error_message": "string",
"property": "string",
"details": [
null
]
}
Unauthorized
{
"error_code": "GENERAL_ERROR",
"error_message": "string",
"property": "string",
"details": [
null
]
}
Internal server error
{
"error_code": "GENERAL_ERROR",
"error_message": "string",
"property": "string",
"details": [
null
]
}
error_code
string
required
Standard error code denoting the error type
- Enum
-
- GENERAL_ERROR
- BAD_REQUEST
- PERMISSION_DENIED
- INVALID_REQUEST_DATA
- REQUIRED_VALUE_MISSING
- VALUE_OUT_OF_BOUNDS
- VALUE_INCORRECT_TYPE
- VALUE_INCORRECT_FORMAT
- VALUE_DUPLICATE
- CONFIGURATION_ERROR
- OUT_OF_RESOURCES
- MAX_LOAD
- TOO_MANY_CONNECTIONS
- DATABASE_ERROR
- CACHE_ERROR
- INTRA_SERVICE_COMMUNICATION_ERROR
- FEATURE_DISABLED
- UNSUPPORTED_SESSION_TYPE
error_message
string
Textual, human readable error message
property
string
The property name causing an error
details
array[]
An array of errors describing error in more detail
reference (error)
recursiveerror_code
string
required
Standard error code denoting the error type
- Enum
-
- GENERAL_ERROR
- BAD_REQUEST
- PERMISSION_DENIED
- INVALID_REQUEST_DATA
- REQUIRED_VALUE_MISSING
- VALUE_OUT_OF_BOUNDS
- VALUE_INCORRECT_TYPE
- VALUE_INCORRECT_FORMAT
- VALUE_DUPLICATE
- CONFIGURATION_ERROR
- OUT_OF_RESOURCES
- MAX_LOAD
- TOO_MANY_CONNECTIONS
- DATABASE_ERROR
- CACHE_ERROR
- INTRA_SERVICE_COMMUNICATION_ERROR
- FEATURE_DISABLED
- UNSUPPORTED_SESSION_TYPE
error_message
string
Textual, human readable error message
property
string
The property name causing an error
details
array[]
An array of errors describing error in more detail
reference (error)
recursiveerror_code
string
required
Standard error code denoting the error type
- Enum
-
- GENERAL_ERROR
- BAD_REQUEST
- PERMISSION_DENIED
- INVALID_REQUEST_DATA
- REQUIRED_VALUE_MISSING
- VALUE_OUT_OF_BOUNDS
- VALUE_INCORRECT_TYPE
- VALUE_INCORRECT_FORMAT
- VALUE_DUPLICATE
- CONFIGURATION_ERROR
- OUT_OF_RESOURCES
- MAX_LOAD
- TOO_MANY_CONNECTIONS
- DATABASE_ERROR
- CACHE_ERROR
- INTRA_SERVICE_COMMUNICATION_ERROR
- FEATURE_DISABLED
- UNSUPPORTED_SESSION_TYPE
error_message
string
Textual, human readable error message
property
string
The property name causing an error
details
array[]
An array of errors describing error in more detail
reference (error)
recursiveWas this page helpful?