Squadbase
Squadbase Docs

REST API

Learn how to use the Squadbase REST API.

Squadbase REST API

The Squadbase REST API lets your app fetch user information and implement access control or RBAC with minimal effort.
This guide explains how to call the API.

In development, you can use the SDKs below to work with mock data, allowing you to test even when the cookie is absent:

Fetching user information

Endpoint:

POST https://{project-id or custom subdomain}.squadbase.app/_sqcore/auth

Request

Pass the authentication token from the __Host-squadbase-session cookie in the Authorization header:

headers: {
  "Authorization": "Bearer <token>"
}

Response

The API returns the user information in JSON:

PropTypeDefault
username?
string
-
email?
string
-
firstName?
string
-
lastName?
string
-
iconUrl?
string | null
-
roles?
string[]
-

On this page