Username and password authentication

The API supports authentication that uses the OAuth 2.0 password flow.

Method

POST /EAI/oauth/token

Content type

application/x-www-form-urlencoded

Example cURL requests

curl -X POST -H "Content-Type:application/x-www-form-urlencoded" -H "Authorization: Basic ZWFpLWNsaWVudDo=" -d "grant_type=password&username=gorditapassword=IluvTr3ats!" https://gateway.domain.com/EAI/oauth/token

curl -X POST -H "Content-Type:application/json" -H "Authorization: Basic ZWFpLWNsaWVudDo=" "https://gateway.domain.com/EAI/oauth/token?grant_type=password&username=testuser &password=testpassword"

Request parameters

Table 1. Request parameters
Parameter name Description
grant_type The user's password.
username The user's username.
password The provided password.

Example response

{
access_token: "4ed14dd2-d4f3-4089-8f06-02ae42a08420"
token_type: "bearer"
refresh_token: "c11fbcad-fb04-4444-abce-1fd3923bc611"
expires_in: 3194
scope: "read"
}

Returns

200: OK for success.
401: Unauthorized for every other response.
403: Forbidden if the account is locked for any reason.