Getting Started With Frontegg APIs

This page will help you get started with Frontegg APIs.

🚧

Important Note: API URL

The API URL you use in your call will be based on the geographical location of your account.

For EU accounts, call api.frontegg.com
For US accounts, call api.us.frontegg.com
For AU accounts, call api.au.frontegg.com

Using our APIs

Frontegg's APIs are based on Bearer Authorization tokens.
To authenticate your environment and get a vendor JWT to use in further API requests, you'll need to pass your environment's Client ID and API key as the clientId and secret respectively to the vendor authentication endpoint

Both Client ID and API Key are available via the [Settings menu] under each environments on the Frontegg portal


Management vs. Self-service APIs

You'll notice that some APIs are marked as Management. Those can be used with your environment token only and are responsible for various environment settings. They should be sent to api.frontegg.com.

Other APIs will be marked as Authentication or Self-service and can be queried both using the environment token and an authenticated user's token. When sending a request in a user context, ensure it is sent to [your-subdomain].frontegg.com.

Example of a request for Self-service API that can be used with both types of Bearer tokens:

Self-service (user) :

\--location -g --request GET 'https\://[your-subdomain].frontegg.com/identity/resources/users/v3/me'  
--header 'Authorization: Bearer {{user-JWT}}'  
--data-raw ''

Environment (Management) :

--location -g --request GET '<https://api.frontegg.com/identity/resources/users/v3/me'>  
--header 'frontegg-user-id: xxxxxxx'  
--header 'frontegg-tenant-id: xxxxxxx'  
--header 'Authorization: Bearer {{vendor-JWT}}'  
--data-raw ''