Generate access token by given credentials
Access token can be generated by providing the credentials in the request body/header. The credentials can be client id and secret or service account generated key jwt. Use the generated access token in Authorization header to access the frontier resources.
application/json
Request Body required
grant_type grant_type can be one of the following:
- client_credentials
- urn:ietf:params:oauth:grant-type:jwt-bearer
client_id client_id and client_secret are required for grant_type client_credentials
client_secret string
assertion assertion is required for grant_type urn:ietf:params:oauth:grant-type:jwt-bearer
Responses
- 200
- 400
- 401
- 403
- 404
- 500
- default
A successful response.
application/json
Schema
Example (from schema)
Schema
access_token string
token_type string
{
"access_token": "string",
"token_type": "string"
}
Bad Request - The request was malformed or contained invalid parameters.
application/json
Schema
Example (from schema)
Schema
code int32
message string
details object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
Unauthorized - Authentication is required
application/json
Schema
Example (from schema)
Schema
code int32
message string
details object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
Forbidden - User does not have permission to access the resource
application/json
Schema
Example (from schema)
Schema
code int32
message string
details object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
Not Found - The requested resource was not found
application/json
Schema
Example (from schema)
Schema
code int32
message string
details object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
Internal Server Error. Returned when theres is something wrong with Frontier server.
application/json
Schema
Example (from schema)
Schema
code int32
message string
details object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
An unexpected error response.
application/json
Schema
Example (from schema)
Schema
code int32
message string
details object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
POST /v1beta1/auth/token
Authorization
name: Basic type: httpdescription: use Client ID as username and Client Secret as passwordin: headerscheme: basic
Request
Request
curl / cURL
curl -L -X POST 'http://127.0.0.1:7400/v1beta1/auth/token' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"grant_type": "string",
"client_id": "string",
"client_secret": "string",
"assertion": "string"
}'
python / requests
curl -L -X POST 'http://127.0.0.1:7400/v1beta1/auth/token' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"grant_type": "string",
"client_id": "string",
"client_secret": "string",
"assertion": "string"
}'
go / native
curl -L -X POST 'http://127.0.0.1:7400/v1beta1/auth/token' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"grant_type": "string",
"client_id": "string",
"client_secret": "string",
"assertion": "string"
}'
nodejs / axios
curl -L -X POST 'http://127.0.0.1:7400/v1beta1/auth/token' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"grant_type": "string",
"client_id": "string",
"client_secret": "string",
"assertion": "string"
}'
ruby / Net::HTTP
curl -L -X POST 'http://127.0.0.1:7400/v1beta1/auth/token' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"grant_type": "string",
"client_id": "string",
"client_secret": "string",
"assertion": "string"
}'
csharp / RestSharp
curl -L -X POST 'http://127.0.0.1:7400/v1beta1/auth/token' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"grant_type": "string",
"client_id": "string",
"client_secret": "string",
"assertion": "string"
}'
php / cURL
curl -L -X POST 'http://127.0.0.1:7400/v1beta1/auth/token' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"grant_type": "string",
"client_id": "string",
"client_secret": "string",
"assertion": "string"
}'
java / OkHttp
curl -L -X POST 'http://127.0.0.1:7400/v1beta1/auth/token' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"grant_type": "string",
"client_id": "string",
"client_secret": "string",
"assertion": "string"
}'
powershell / RestMethod
curl -L -X POST 'http://127.0.0.1:7400/v1beta1/auth/token' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"grant_type": "string",
"client_id": "string",
"client_secret": "string",
"assertion": "string"
}'