POST api/auth/token
Generates an access token after validating the submitted client credentials.
Request Information
URI Parameters
None.
Body Parameters
The request body containing the ClientId and ClientSecret.
TokenRequest| Name | Description | Type | Additional information |
|---|---|---|---|
| ClientId |
Gets or sets the client identifier configured for API authentication. |
string |
None. |
| ClientSecret |
Gets or sets the client secret used to authenticate the API client. |
string |
None. |
Request Formats
application/json
Sample:
{
"ClientId": "sample string 1",
"ClientSecret": "sample string 2"
}
application/json
Sample:
<AuthController.TokenRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Proofs.Controllers"> <ClientId>sample string 1</ClientId> <ClientSecret>sample string 2</ClientSecret> </AuthController.TokenRequest>
application/json
Sample:
Response Information
Resource Description
Returns an access token with its token type and expiration duration when authentication succeeds. Returns HTTP 400 if the request is missing. Returns HTTP 401 if the client credentials are invalid. Returns HTTP 500 if the configured API credentials are missing.
IHttpActionResultNone.