Request an access token by providing a "login_info" object with a valid user credential.

Example request

Endpoint:
POST /api/auth/token

Headers:
Content-Type:application/json

Body: 
{
	"grant_type": "login_info",
	"scope": "{scopes}",
	"client_id": "{app client_id}",
	"client_secret": "{app secret}",
	"login_info": {
		"type": 2,
		"pin": "{user pin}"
	}
}
CODE

Login Info grant allows requests for access tokens by providing user credentials, but different from Password grant, this request must have a "login_info" object. This object allows log in by using one of the valid users login options, here are some login info objects examples for each login type:

User Card

"login_info": {
	"type": 1,
	"card": "{user card code}"
}
CODE

User Pin

"login_info": {
	"type": 2,
	"pin": "{user pin}"
}
CODE

User and Password

"login_info": {
	"type": 3,
	"user": "{user name}",
	"pwd": "{user password}"
}
CODE

Card and Pin

"login_info": {
	"type": 4,
	"card": "{user card code}",
	"pin": "{user pin}"
}
CODE

Card and Password

"login_info": {
	"type": 5,
	"card": "{user card code}",
	"pwd": "{user password}"
}
CODE

Retrieving an access token

If authentication is successful, you'll receive an access token that must be provided at any other API endpoint.

Example Response

{
	"access_token": "{your_bearer_token}",
	"token_type": "Bearer",
	"expires_in": 1800,
	"scope": "{granted scopes}",
	"refresh_token": "{your_refresh_token}"
}
CODE