POST api/v{version}/authorize/{username}/{password}
Request the authorization code needed to obtain an access token through the token/code endpoint.
Request Information
URI Parameters
Name | Description | Type | Additional information |
---|---|---|---|
username |
The username. |
string |
Default value is |
password |
The password. |
string |
Default value is |
version | string |
None. |
Body Parameters
None.
Response Information
Resource Description
ResponseOfAuthorizationCodeModelName | Description | Type | Additional information |
---|---|---|---|
Data | AuthorizationCodeModel |
None. |
|
StatusCode |
Gets or sets the status code. |
HttpStatusCode |
None. |
StatusDescription |
Gets or sets the status description. |
string |
None. |
Errors | Collection of string |
None. |
Response Formats
application/json, text/json
Sample:
{ "data": { "code": "sample string 1", "expires": "2024-10-30T09:52:16.8471557-07:00" }, "statusCode": 100, "statusDescription": "sample string 1", "errors": [ "sample string 1", "sample string 2" ] }
application/xml, text/xml
Sample:
<ResponseOfAuthorizationCodeModelm8NcPL_PI xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CancerBytesAPI.Response"> <Errors xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d2p1:string>sample string 1</d2p1:string> <d2p1:string>sample string 2</d2p1:string> </Errors> <StatusCode>Continue</StatusCode> <StatusDescription>sample string 1</StatusDescription> <Data> <Code>sample string 1</Code> <Expires>2024-10-30T09:52:16.8471557-07:00</Expires> </Data> </ResponseOfAuthorizationCodeModelm8NcPL_PI>