Skip to main content
POST
/
index.php
/
api
/
oauth2
cURL
curl --request POST \
  --url https://marketplace-as-a-service.herokuapp.com/index.php/api/oauth2 \
  --header 'Content-Type: application/json' \
  --data '
{
  "username": "demo_user",
  "password": "demo_pass",
  "grant_type": "password"
}
'
{
  "access_token": "93019854-6B88-4997-9179-C1C50E7D2E9D",
  "expires_in": 3600,
  "refresh_token": "2495C12E-AFFA-40AD-8B91-61D7CEE3D5DC",
  "refresh_expires_in": 18000,
  "fuse_client_id_seq": null
}

Body

application/json

Provide username, password, and grant_type (password).

username
string
required

Your system username

password
string
required

Your system password

grant_type
string
required

It is used by confidential and public clients to exchange an authorization code for an access token. It would be 'password'.

Example:

"password"

Response

Successful response

access_token
string

The access token to authenticate requests.

expires_in
integer

Time in seconds until the access token expires.

refresh_token
string

The refresh token used to obtain a new access token.

refresh_expires_in
integer

Time in seconds until the refresh token expires.

fuse_client_id_seq
string | null

Client ID sequence, can be null.