REST API Reference

OAuth Namespace

The oauth namespace contains the resource to obtain the access token using OAuth 2.0 needed for conducting operations on the system.

Program Token


Header Parameters:

Endpoint URL HTTP Method URL Parameters
/Service/oauth/token POST

URL Parameters should be as : x-www-form-urlencoded

grant_type : program_credential
user_name : restTest
password : testPass
program_Id : 24 [required]
language : en,ar,fr,de [optional]

Program Token Response

Note that the Token Expiry is set to 86400 seconds which is 24 hours.
Note that the system will return same token if not expired.



            {
                 "access_token": "TokenString",
                 "token_type": "bearer",
                 "expires_in": 86400
            }


User Token


Header Parameters:

Endpoint URL HTTP Method URL Parameters
/Service/oauth/token POST

URL Parameters should be as : x-www-form-urlencoded

grant_type : user_credential
user_email : test@test.com
password : testPass
program_Id : 24 [required]
language : en,ar,fr,de [optional]

User Token Response

Note that the Token Expiry is set to 86400 seconds which is 24 hours.
Note that the system will return same token if not expired.



            {
                 "access_token": "TokenString",
                 "token_type": "bearer",
                 "expires_in": 86400
            }


Terminal Token


Header Parameters:

Endpoint URL HTTP Method URL Parameters
/Service/oauth/token POST

URL Parameters should be as : x-www-form-urlencoded

grant_type : terminal_credential
email_or_telephone : test@test.com
terminal_user_id : 123
password : passTest [required]
language : en,ar,fr,de [optional]

Terminal Token Response

Note that the Token Expiry is set to 86400 seconds which is 24 hours.
Note that the system will return same token if not expired.



            {
                 "access_token": "TokenString",
                 "token_type": "bearer",
                 "expires_in": 86400
            }


Terminal User Token


Header Parameters:

Endpoint URL HTTP Method URL Parameters
/Service/oauth/token POST

URL Parameters should be as : x-www-form-urlencoded

grant_type : terminal_user_credential
email_or_telephone : test@test.com
terminal_user_id : 123
password : passTest [required]
language : en,ar,fr,de [optional]

Terminal User Token Response

Note that the Token Expiry is set to 86400 seconds which is 24 hours.
Note that the system will return same token if not expired.



            {
                 "access_token": "TokenString",
                 "token_type": "bearer",
                 "expires_in": 86400
            }


Top