POST api/Account/SignIn
Sign in to authenticate. If successful, an OAuth 2.0 authorization (JWT) token is generated returned which is required by all other end points. The token must be placed after the word "bearer " in the Authorization key of the header for all subsequent actions. See https://oauth.net/2/
Request Information
URI Parameters
None.
Body Parameters
User credentials
ClientCredentials| Name | Description | Type | Additional information |
|---|---|---|---|
| grant_type |
grant_type must be password |
string |
Required |
| client_id |
The email address associated with the user account |
string |
Required Matching regular expression pattern: ^([\w\.\-]+)@([\w\-]+)((\.(\w){2,3})+)$ |
| client_secret |
The encrypted password associated with the user account |
string |
Required |
Request Formats
application/json, text/json
{
"grant_type": "sample string 1",
"client_id": "sample string 2",
"client_secret": "sample string 3"
}
application/xml, text/xml
<ClientCredentials xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/HSTS.API.Models"> <client_id>sample string 2</client_id> <client_secret>sample string 3</client_secret> <grant_type>sample string 1</grant_type> </ClientCredentials>
application/x-www-form-urlencoded
Response Information
Resource Description
Returns OK if successful, BadRequest if input is invalid, or Unauthorized if password is incorrect or email not valid for user account. If OK, an AuthenticationResponse object is returned in the response body with the OAuth 2.0 authorization token.
AuthenticationResponse| Name | Description | Type | Additional information |
|---|---|---|---|
| token_type |
bearer |
string |
None. |
| access_token |
The Json Web Token, see https://jwt.io |
string |
None. |
| expires_in |
seconds |
integer |
None. |
| ClassVer |
The class version of this response |
integer |
None. |
| WebApiVersion |
The version of this API |
PrimeVersion |
None. |
| ApiKeyHolder |
The account name of the ApiKey that is associated with the user |
string |
None. |
Response Formats
application/json, text/json
{
"token_type": "sample string 1",
"access_token": "sample string 2",
"expires_in": 3,
"ClassVer": 1,
"WebApiVersion": {
"Major": 1,
"Minor": 3,
"Build": 0
},
"ApiKeyHolder": "sample string 4"
}
application/xml, text/xml
<AuthenticationResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/HSTS.API.Models"> <ApiKeyHolder>sample string 4</ApiKeyHolder> <access_token>sample string 2</access_token> <expires_in>3</expires_in> <token_type>sample string 1</token_type> </AuthenticationResponse>