Get Allowed Features
Returns a list of features and functionalities available to the authenticated user based on their current subscription plan.Authentication
This endpoint requires authentication via bearer token representing a valid user session managed by Supabase Auth (cookies).Testing Note: Due to the requirement for a live user session, this endpoint cannot be successfully tested directly using the ‘Send’ button in this documentation with a static token.To test:
- Call this endpoint from your web application after logging in.
- Use
curl
or a similar tool with a valid, current user JWT obtained from your browser’s session after logging in.
curl
, you need the JWT access token stored by Supabase Auth in your browser.
- Log in to your application normally in your browser.
- Open Developer Tools (usually F12).
- Go to the Application tab (it might be called Storage in Firefox).
- Under the Storage section, find Cookies and select your application’s domain (e.g.,
http://localhost:3000
orhttps://onlyautomator.com
). - Look for a cookie named similar to
sb-access-token
(the exact name might vary slightly based on Supabase configuration). - Copy the entire value of this cookie. This is your Bearer token.
- Use this copied value in the
Authorization: Bearer <your_copied_token>
header for yourcurl
or other API tool requests.
Request
Bearer token for authentication. Format:
Bearer YOUR_JWT_TOKEN
Response
HTTP status code (e.g., 200).
A descriptive message about the result (e.g., “Features retrieved successfully”).
An object containing feature flags and limits available based on the user’s subscription.
Error Codes
Status Code | Description | Example Message |
---|---|---|
401 | Invalid or missing authentication token. | ”Not authorized” |
404 | User subscription info not found. | ”Subscription details not found” |
500 | Internal server error during processing. | ”Failed to retrieve features” |
Code Examples
Notes
- The response includes feature flags and limits that correspond to the user’s current subscription plan.
- This endpoint is useful for client applications to enable/disable UI elements based on the user’s subscription.
- The features returned may change as new functionality is added to the platform or subscription plans are modified.
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Headers
Bearer token for authentication (JWT)