Exchanges an OAuth authorization access code for an access token.

Request

POST https://api.bytehand.com/v2/oauth/token

Parameters

Query Parameters
client_id

number

Required parameter. The unique ID of your application.

client_secret

string

Required parameter. Your app's secure key.

code

string

Required parameter. Access code for OAuth authorization received from BYTEHAND API to your redirect_uri.

grant_type

string

Required parameter. Access key type. Specify authorization_code.

redirect_uri

string

Required parameter. The address to which the code will be passed must match the values in the app's list of trusted addresses. You can add an address to the list of trusted addresses through support.

Authorization

Does not require authorization and any specific access rights.

Response

Upon successful completion of the request, an object of type OAuthCredential is returned.

Example

Request

POST https://api.bytehand.com/v2/oauth/token?code=x3MwNSEPLW2PnAnWCbLdRevprwegQ0KhrcifmZk3NqZwhVdJ6Hg81yR8tZUjNIAw&grant_type=authorization_code&client_secret=XWfS42PiQPXxiOxsB1qSCfHb0efr7fqt&redirect_uri=https%3A%2F%2Fsomewhere.com%2Fcallback&client_id=7125

Response

Status Code: 200
Content-Type: application/json;charset=UTF-8
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache

{
  "user_id": 82136,
  "access_token": "heJNRR7Fho8NhBigdHNMOm2tvmLa9ojh",
  "token_type": "Bearer"
}