API Reference
The AuthOS API serves as the backend for authentication operations. It is designed to be consumed by the AuthOS SDKs or directly by HTTP clients.
Base URL
By default, the API runs on:
http://localhost:3001Authentication
All Client API requests utilize the Authorization header with a Bearer token containing your Publishable Key.
Authorization: Bearer <YOUR_PUBLISHABLE_KEY>Endpoints
Client API
Sign In
Authenticate an existing user.
POST /v1/client/sign-inRequest Body
| Parameter | Type | Required | Description |
|---|---|---|---|
email | string | Yes | The user’s email address. |
password | string | Yes | The user’s password. |
Response (200 OK)
{
"token": "eyJhbGciOiJIUzI1Ni...",
"user": {
"id": "usr_123",
"email": "user@example.com",
"name": "John Doe",
"image": "..."
}
}Sign Up
Register a new user account.
POST /v1/client/sign-upRequest Body
| Parameter | Type | Required | Description |
|---|---|---|---|
email | string | Yes | The user’s email address. |
password | string | Yes | The user’s password. |
name | string | No | The user’s full name. |
Response (201 Created)
{
"user": {
"id": "usr_123",
"email": "user@example.com",
"name": "John Doe",
"image": "..."
}
}Last updated on