Authentication API

Authorization

Endpoint

Method URI Headers
GET /oauth/authorize Default

This enpoint authorizes a user to be able to request resources from the server. After authorizing, user will be redirected to $redirectURL.

URL Params

{
    "client_id"    : $clientId,
    "redirect_uri"     : $redirectURL,
    "response_type" : "code",
    "scope"      : "*",
    "state"      : $state
}

{info} After being redirected to $redirectURL, it will include code in the querystring which you need to include in the token request below.


Endpoint

Method URI Headers
POST /oauth/token Default

This enpoint returns access token that can be used to request resources from the server.

Form Params

{
    "grant_type"    : "authorization_code",
    "client_id"     : $clientId,
    "client_secret" : $secret,
    "redirect_uri"      : $redirectURL,
    "code"      : $code
}

Response

{
    "token_type"    : "Bearer",
    "expires_in"     : 31536000,
    "access_token" : "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9",
    "refresh_token"      : "def50200014f3f27858ab9446214f089d26"
}