POST

https://{customer_name}.login.fabric.inc

/
oauth2
/
{authServerId}
/
v1
/
token

Headers

Authorization
string

Required for user apps with authorization code flow without PKCE and for system apps. Basic authorization header should be created using the client ID and client secret of the app. The value should be derived as Basic base64encode(client_id:client_secret). Refer to https://datatracker.ietf.org/doc/html/rfc2617#section-2 for additional info.

Path Parameters

authServerId
string
required

Use default for user app flows. For system apps, use the tenant-specific server ID provided by fabric Identity (see Getting Started).

Body

application/x-www-form-urlencoded
grant_type
enum<string>
required

Required for all authentication flows and app types. Set to authorization_code for user apps (for both authorization code flow with and without PKCE). Set to client_credentials when using for system apps.

Available options:
authorization_code,
client_credentials
client_id
string

Required only for user apps and authorization code flow with PKCE.

client_secret
string

Required only for user apps and authorization code flow with PKCE.

redirect_uri
string

Required for user apps with both authorization code flow with and without PKCE. URL encoded redirect_uri sent by the user app in the previous /authorize call.

code_verifier
string

Required only for user apps and authorization code flow with PKCE. Code verifier using for deriving the code_challenge sent in the /authorize call. Refer to https://datatracker.ietf.org/doc/html/rfc7636#section-4.2 for more details

code
string

Required for user apps with both authorization code flow with and without PKCE. Authorization code received as part of the callback response to the /authorize call.

scope
string
default: s2s

Required only for system apps. Value should always be set to s2s.

Response

200 - application/json
token_type
string

Will always be set to Bearer

expires_in
number

Describes the time in seconds in which the issued access token expires

access_token
string

The access token issued for the logged in user or the app itself. This access token should be used as a bearer token in the Authorization header of subsequent fabric API calls.

id_token
string

This token certifies that the user or app was indeed authenticated successfully. However, this token isn't to be used when invoking fabric APIs, use access token instead.

scope
string

Always set to openid profile email as part of the OpenID Connect standard.