Generate Token API
Generate Access Token using client id and client secret.
Request
URI
POST
https://{api_host}/vcf/generateToken
COPY
Request Body
Generate Token API. Please note Authorization header is not needed for this API as the API itself generates access token.
TokenRequest
of mimetype
application/x-www-form-urlencoded
Required
string
grant_type
Required
Grant Type. Supported Value - 'client_credentials'
string
client_id
Required
Client Id
string
client_secret
Required
Client Secret
Responses
200
Successful operation
Returns
TokenResponse
of type(s)
application/json
{
"value": {
"access_token": "string",
"token_type": "Bearer",
"expires_in": 3600,
"scope": "vcf"
}
}
string
access_token
Optional
access_token
string
token_type
Optional
token_type
string
expires_in
Optional
expires_in
string
scope
Optional
scope
array of
string
resource
Optional
List of resources
400
Bad Request
Returns
ErrorResponse1
of type(s)
application/json
{
"value": {
"error": "unsupported_grant_type",
"error_description": "The given grant_type is not supported"
}
}
string
error
Optional
error
string
error_description
Optional
error_description
401
Unauthorized
Returns
ErrorResponse1
of type(s)
application/json
{
"value": {
"error": "invalid_client",
"error_description": "The given client credentials were not valid"
}
}
string
error
Optional
error
string
error_description
Optional
error_description
404
Not Found
Returns
ErrorResponse1
of type(s)
application/json
"ErrorResponse1 Object"
string
error
Optional
error
string
error_description
Optional
error_description
500
Internal Server Error
Returns
ErrorResponse1
of type(s)
application/json
"ErrorResponse1 Object"
string
error
Optional
error
string
error_description
Optional
error_description
Code Samples
COPY
curl -X POST -H 'Authorization: <value>' -H 'Content-Type: application/x-www-form-urlencoded' -d '{"client_id:"string","client_secret:"string","grant_type:"string"}' https://{api_host}/vcf/generateToken
Token Generation Operations
POST
Generate Token API