POST v1/Token/UserAuthentication

Generates API authorization token for domain and user.

Request Information

URI Parameters

None.

Body Parameters

LoginUserRequest
NameDescriptionTypeAdditional information
DomainName

Provide User Domain Name

string

Required

UserName

Provide User Login Name

string

Required

Password

Provide Login Password

string

Required

IsPasswordEncrypted

If password is in encrypted format

boolean

Required

Request Formats

application/json, text/json

Sample:
{
  "DomainName": "sample string 1",
  "UserName": "sample string 2",
  "Password": "sample string 3",
  "IsPasswordEncrypted": true
}

application/xml, text/xml

Sample:
<LoginUserRequest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <DomainName>sample string 1</DomainName>
  <UserName>sample string 2</UserName>
  <Password>sample string 3</Password>
  <PasswordEncrypted>true</PasswordEncrypted>
</LoginUserRequest>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'LoginUserRequest'.

Response Information

Response Formats

application/json, text/json

Sample:
{
  "access_token": "sample string 1",
  "refresh_token": "sample string 2",
  "token_type": "sample string 3",
  "expires_in": 4
}

application/xml, text/xml

Sample:
<MidnightAuthResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <access_token>sample string 1</access_token>
  <refresh_token>sample string 2</refresh_token>
  <token_type>sample string 3</token_type>
  <expires_in>4</expires_in>
</MidnightAuthResponse>