Skip to main content
The Soundcheck API uses Clerk JWT tokens for authentication.

Overview

All API requests (except public endpoints) require a valid JWT token in the Authorization header:

Token flow


Getting a token

Mobile (React Native)

Web (Next.js)


Token lifecycle


Backend verification

The API verifies tokens using Clerk’s secret key:

Error responses

401 Unauthorized

Missing or invalid token:

403 Forbidden

Valid token but insufficient permissions:

Public endpoints

These endpoints don’t require authentication:

Testing authentication

Get a token

Test API request


Security best practices

  1. Never expose tokens - Don’t log or store tokens insecurely
  2. Use HTTPS - Always use HTTPS in production
  3. Short expiration - Tokens expire after 1 hour
  4. Secure storage - Use SecureStore (mobile) or HTTP-only cookies (web)
  5. Revocable sessions - Sessions can be revoked from Clerk Dashboard

Troubleshooting

Check that your HTTP client is including the Authorization header:
  1. Verify Clerk secret key matches between frontend and backend
  2. Check token hasn’t expired
  3. Ensure user is signed in
  1. Check network connectivity
  2. Verify Clerk session is valid
  3. Try signing out and back in