Tokens can be easily generated via a simple API call. The request to the token exchange should contain 4 key value pairs in the request body:
The request should be sent using the header:
Content-Type: application/x-www-form-urlencoded
The key-value pair should be in a string, with "=" between the key and value. Each key-value pair should be separated with "&".
The response body contains 4 properties:
access_token: is the JWT token which holds all of your privileges and access rights. Be sure to keep it secure and away from publicly accessible areas as GitHub or client side code
scope: is the permissions and access rights of the token
expires_in: is how long the JWT is valid for in seconds
token_type: is what kind of token the token is. In our responses it is specified Bearer which indicates that that you authenticate with a bearer token, "
{
"access_token": "eyJh...",
"scope": "read_userprofile fullcontrol:user",
"expires_in": 86400,
"token_type": "Bearer"
}
Every call to our API requires an access token in order to be authorized and API requests are rejected if plain HTTP is used. HTTPS is required.