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.

LDAPServerId

Indicate the LDAP server id. If don't use LDAP authentication. please ignore it.

integer

None.

IsInSessionAuth

integer

None.

Request Formats

application/json, text/json

Sample:
{
  "Grant_type": "sample string 1",
  "UserName": "sample string 2",
  "Password": "sample string 3",
  "LDAPServerId": 4,
  "IsInSessionAuth": 5
}

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>
  <IsInSessionAuth>5</IsInSessionAuth>
  <LDAPServerId>4</LDAPServerId>
  <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.

DTTSessionId

integer

None.

Response Formats

application/json, text/json

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

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">
  <DTTSessionId>5</DTTSessionId>
  <access_token>sample string 1</access_token>
  <firstName>sample string 3</firstName>
  <lastName>sample string 4</lastName>
  <userId>2</userId>
</TokenModel>