Authentication
The usmewe API uses JWT (JSON Web Tokens) for authentication, powered by Supabase Auth.Authentication Flow
Getting a Token
Option 1: OAuth (Recommended)
Use Google OAuth for the simplest authentication:Option 2: Email/Password
Using the Token
Include the JWT in theAuthorization header:
Token Refresh
Tokens expire after 1 hour. Refresh before expiration:API Key Authentication
For server-to-server integrations, use API keys:API keys are only available for Pro and Enterprise tiers. Contact us to request access.
Error Responses
Invalid Token
Missing Token
Security Best Practices
Never expose tokens in URLs
Never expose tokens in URLs
Always send tokens in headers, never as query parameters
Store tokens securely
Store tokens securely
Use secure storage (keychain, encrypted storage) on mobile/desktop
Implement token refresh
Implement token refresh
Refresh tokens before they expire to avoid interruptions
Use HTTPS only
Use HTTPS only
All API requests must use HTTPS
Next Steps
Users API
Get user profiles and settings
JavaScript SDK
Use our official SDK