POST api/OAuth/GetAccessToken
Method for getting access token for OAuth2 authorization.
Request Information
URI Parameters
None.
Body Parameters
Properties needed for OAuth2 password grand type authentication.
TokenCredentials| Name | Description | Type | Additional information |
|---|---|---|---|
| ClientID |
ClientID given by responsible authority. |
string |
Required |
| ClientSecret |
Secret code given by responsible authority. |
string |
Required |
| Username |
Username of user trying to get access token. |
string |
None. |
| Password |
Password of user trying to get accesss token. |
string |
None. |
Request Formats
application/json, text/json
Sample:
{
"clientID": "sample string 1",
"clientSecret": "sample string 2",
"username": "sample string 3",
"password": "sample string 4"
}
application/xml, text/xml
Sample:
<TokenCredentials xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/eMedit.eDoktor.WebApi.Models.Api.OAuth"> <ClientID>sample string 1</ClientID> <ClientSecret>sample string 2</ClientSecret> <Password>sample string 4</Password> <Username>sample string 3</Username> </TokenCredentials>
application/x-www-form-urlencoded
Sample:
Sample not available.
Response Information
Resource Description
Json object containing access_token, token_type, expires_in, expiresUTC and refresh_token.
IHttpActionResultNone.
Response Formats
application/json, text/json, application/xml, text/xml
Sample:
Sample not available.