Skip to main content
POST
/
oauth
/
token
Create access token
curl --request POST \
  --url https://api.light.inc/oauth/token \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --data 'client_id=<string>' \
  --data 'client_secret=<string>' \
  --data 'grant_type=<string>' \
  --data 'code=<string>' \
  --data 'redirect_uri=<string>' \
  --data 'refresh_token=<string>'
{
  "access_token": "<string>",
  "expires_in": 123,
  "token_type": "<string>",
  "refresh_token": "<string>"
}

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <api_key>, where <api_key> is your api key.

Body

application/x-www-form-urlencoded
client_id
string
client_secret
string
grant_type
string
code
string
redirect_uri
string
refresh_token
string

Response

default - application/json;charset=UTF-8

default response

access_token
string
expires_in
integer
token_type
string
refresh_token
string
I