POST token

Get a user token.

Request Information

URI Parameters

None.

Body Parameters

Content-Type:application/x-www-form-urlencoded, its content should be like following: grant_type=password&username={username}&password={password}

LoginBinding
NameDescriptionTypeAdditional information
Grant_type

Grant_type only support "password" now .

string

None.

UserName

string

None.

Password

string

None.

Request Formats

application/json, text/json

Sample:
{
  "Grant_type": "sample string 1",
  "UserName": "sample string 2",
  "Password": "sample string 3"
}

application/xml, text/xml

Sample:
<LoginBinding xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TechExcel.DevTrackApi.Bindings">
  <Grant_type>sample string 1</Grant_type>
  <Password>sample string 3</Password>
  <UserName>sample string 2</UserName>
</LoginBinding>

application/x-www-form-urlencoded

Sample:
Grant_type=password&UserName=terry-j&Password=terry-j

Response Information

Resource Description

Get a user token.

TokenModel
NameDescriptionTypeAdditional information
access_token

string

None.

userId

integer

None.

firstName

string

None.

lastName

string

None.

Response Formats

application/json, text/json

Sample:
{
  "access_token": "sample string 1",
  "userId": 2,
  "firstName": "sample string 3",
  "lastName": "sample string 4"
}

application/xml, text/xml

Sample:
<TokenModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TechExcel.DevTrackApi.Controllers">
  <access_token>sample string 1</access_token>
  <firstName>sample string 3</firstName>
  <lastName>sample string 4</lastName>
  <userId>2</userId>
</TokenModel>