0
No votes yet
Server-side client applications of H2H Partners should use this API to generate an Access Token for a specific set of scopes.
Attachment | Size |
---|---|
![]() | 1.05 KB |
production
development
https://sandboxapi.rakbank.ae/sb/api
Paths
/token
post /token
Request Access Tokens
This endpoint allows requesting an access token
clientIdHeader
X-IBM-Client-Id
(apiKey located in header)
clientSecretHeader
X-IBM-Client-Secret
(apiKey located in header)
MsgId
Required in header
string
MsgId
access_token_request
Required in body
object
Access Token Request
Content-Type
Optional in header
string
application/json
Accept
Optional in header
string
application/json
Example Request
Example Response
POST https://sandboxapi.rakbank.ae/sb/api/v1/h2h_auth/token
Try this operation
No response. This is a mixed content call. It is not possible to test HTTP APIs from an HTTPS secured Portal site and vice versa.
No response. This is a cross-origin call. Make sure the server accepts requests from this portal. Or if using self-signed SSL certificates then paste the URL above into your browser to accept the certificate before trying again (On Internet Explorer it must be the same browser tab.).
Definitions
request for access token
{
"type": "object",
"properties": {
"grant_type": {
"type": "string",
"enum": [
"client_credentials"
],
"description": "Type of grant. Valid values are \"client_credentials\""
}
},
"required": [
"grant_type"
],
"additionalProperties": false
}
{
"type": "object",
"additionalProperties": false,
"required": [
"token_type",
"access_token",
"expires_in",
"scope"
],
"properties": {
"token_type": {
"enum": [
"bearer"
],
"description": "The token type",
"example": "bearer"
},
"access_token": {
"type": "string",
"minLength": 1,
"maxLength": 5000,
"description": "The access token"
},
"expires_in": {
"type": "integer",
"description": "The expiry time in seconds"
},
"scope": {
"type": "string",
"minLength": 1,
"maxLength": 500,
"description": "Scope that was requested"
}
}
}
Response in case of error
{
"properties": {
"status": {
"type": "string",
"description": "HTTP Status"
},
"response_code": {
"type": "string",
"description": "API specific error code"
},
"property": {
"type": "string"
},
"response_message": {
"type": "string",
"description": "brief type of the error",
"example": ""
},
"description": {
"type": "string",
"description": "detailed description of the error"
}
},
"additionalProperties": false,
"required": [
"response_code",
"status",
"response_message"
]
}