Migrate to AWS Partner Central 3.0 in 30 minutes.

Migrate now (opens in a new tab)
Skip to main content
POST
/api/token

Exchanges SaaSify user credentials for an opaque bearer token using the OAuth2 resource-owner password grant, or refreshes an existing token with the refresh_token grant. The body is application/x-www-form-urlencoded. There is no client id/secret. Send the optional TenantCode header to select a tenant when the user belongs to more than one. The returned token is valid for 1440 minutes and is sent on every other call as Authorization: Bearer <token>. Do not send the X-SaaSify-Client header from server-to-server integrations (it switches the token into browser cookies).

Header Parameters

TenantCode?string

Optional tenant code. Sets the default tenant context for the issued token.

Request Body

application/x-www-form-urlencoded
  1. body
password?string

SaaSify user password (password grant).

username?string

SaaSify user email (password grant).

grant_type*string

Grant type.

Value in"password""refresh_token"
onBehalfOf?string

Optional impersonation claim (username to act on behalf of).

refresh_token?string

A previously issued refresh token (refresh_token grant).

Response Body

A bearer token. This endpoint returns the raw OAuth token object, not the standard envelope.

application/json
  1. response

OAuth token response from POST /api/token.

userName?string
expires_in?integer

Seconds until expiry (about 1440 minutes).

onBehalfOf?string
token_type*string
access_token*string

Opaque bearer token.

isTenantUser?string
refresh_token?string
curl -X POST 'https://api-demo.saasify.ai/api/token' \  -H 'Content-Type: application/x-www-form-urlencoded' \  -d 'grant_type=refresh_token&refresh_token=N2Q0...opaque'
Example Response
{  "userName": "integration@acme.com",  "expires_in": 86399,  "onBehalfOf": "",  "token_type": "bearer",  "access_token": "m5Jb3q...opaque-katana-token",  "isTenantUser": "true",  "refresh_token": "N2Q0...opaque"}

Was this page helpful?