REST API
Learn how to use the Squadbase REST API.
Squadbase REST API
The Squadbase REST API allows your application to retrieve user information and easily implement access control or RBAC. This guide explains how to use the API.
During development, you can use the following SDKs to work with mock data. This allows you to test the API even when the cookie is not present.
- Streamlit: squadbase-streamlit
- Next.js: @squadbase/nextjs
- Server-side JavaScript: @squadbase/server
Fetching User Information
Use the following API endpoint to retrieve user information:
POST https://{projectid or custom subdomain}.squadbase.app/_sqcore/authRequest
Include the authentication token from the cookie in the Authorization header.
Use the cookie named __Host-squadbase-session.
{
"headers": {
"Authorization": "Bearer <token>"
}
}Response
The API returns the following user information in JSON format:
Prop
Type