0
No votes yet
Server-side client applications of Partners should use this API to generate an Access Token for a specific set of scopes. Any metadata that needs to be included into the access token can be provided in the "oauth_metadata". Certain scopes may require specific metadata fields. Wherever applicable, the API specification will have the details.
Attachment | Size |
---|---|
![]() | 1.37 KB |
Basepath
/v1
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/partner_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\""
},
"scope": {
"type": "string",
"minLength": 1,
"maxLength": 500,
"description": "Scope being requested"
},
"oauth_metadata": {
"description": "",
"$ref": "#/definitions/oauth_metadata"
}
},
"required": [
"grant_type",
"scope"
],
"additionalProperties": false
}
{
"type": "object",
"additionalProperties": true,
"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"
]
}
This will contain the metadata to be included in the oauth token. Certain scopes may require specific metadata fields. Wherever applicable, the API specification will have the details.
{
"properties": {
"account_id": {
"type": "string",
"description": "Account ID against which access_token is requested.",
"example": "0188000049916"
},
"emirates_id": {
"type": "string",
"description": "Emirates ID against which access_token is requested.",
"example": "500000000006190"
}
},
"additionalProperties": true
}