Skip to main content

Overview

Authenticates a user with their email and password. On success, returns a JWT Bearer token you can use to authorize subsequent requests.

Request

Method: POST URL: /api/v1/auth/login

Headers

HeaderValue
Content-Typeapplication/json

Body parameters

email
string
required
The email address associated with your account.
password
string
required
Your account password.

Response

access_token
string
The JWT Bearer token to include in the Authorization header of authenticated requests.
token_type
string
Always "bearer".

Example

curl -X POST https://api.pingback.live/api/v1/auth/login \
  -H "Content-Type: application/json" \
  -d '{
    "email": "jane@example.com",
    "password": "securepassword123"
  }'
const response = await fetch('https://api.pingback.live/api/v1/auth/login', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    email: 'jane@example.com',
    password: 'securepassword123',
  }),
});
const data = await response.json();
// data.access_token is your Bearer token

Response example

{
  "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  "token_type": "bearer"
}

Errors

StatusMeaning
401Unauthorized — incorrect email or password
422Validation error — missing required fields