Skip to content
DocsAPI ReferenceAPI Authentication
API Reference

API Authentication

API Authentication

The Conseto API uses JWT tokens for authentication. All authenticated endpoints require a Bearer token in the Authorization header.

Getting a Token

bash
curl -X POST https://api.conseto.io/api/auth/login \
  -H "Content-Type: application/json" \
  -d '{
    "email": "your@email.com",
    "password": "your_password"
  }'

# Response:
{
  "token": "eyJhbGciOiJIUzI1NiIs...",
  "user": {
    "id": "uuid",
    "email": "your@email.com",
    "role": "user"
  }
}

Using the Token

bash
# Include in every authenticated request
curl https://api.conseto.io/api/clients \
  -H "Authorization: Bearer YOUR_JWT_TOKEN"

API Keys

For server-side SDKs, use your API key (found in Dashboard → Settings → Projects):

javascript
// Node.js SDK
const conseto = new Conseto({
  clientId: 'conseto_yoursite_xxx',
  apiKey: 'csk_your32hexcharkey'
});
Security

Never expose your API key in client-side code. API keys are for server-to-server communication only.

Auth Endpoints

MethodEndpointDescription
POST/api/auth/loginLogin and get JWT token
POST/api/auth/registerCreate new account
POST/api/auth/forgot-passwordRequest password reset email
POST/api/auth/reset-passwordReset password with token
POST/api/auth/resend-verificationResend email verification
Documentation — CONSETO | CONSETO