Skip to main content
POST
/
auth
/
token
curl -X POST "https://api.vidaplus.com/auth/token/" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d "[email protected]&password=securepassword123"
{
  "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJ1c2VyQGV4YW1wbGUuY29tIiwiZXhwIjoxNzA5ODI0ODAwfQ.abc123def456",
  "token_type": "bearer"
}
Authenticates a user with email and password credentials and returns a JWT access token for subsequent API requests.

Request

This endpoint uses OAuth2 password flow with form data.
username
string
required
User’s email address (used as username in OAuth2 flow)
password
string
required
User’s password
grant_type
string
OAuth2 grant type (typically “password”)
scope
string
OAuth2 scope (optional)
client_id
string
OAuth2 client ID (optional)
client_secret
string
OAuth2 client secret (optional)

Response

access_token
string
required
JWT access token for authenticating subsequent requests
token_type
string
required
Token type, always returns “bearer”
curl -X POST "https://api.vidaplus.com/auth/token/" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d "[email protected]&password=securepassword123"
{
  "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJ1c2VyQGV4YW1wbGUuY29tIiwiZXhwIjoxNzA5ODI0ODAwfQ.abc123def456",
  "token_type": "bearer"
}

Usage

After obtaining the access token, include it in the Authorization header for subsequent API requests:
Authorization: Bearer <access_token>

Token Details

  • Algorithm: JWT (JSON Web Token)
  • Expiration: Tokens expire based on the server’s ACCESS_TOKEN_EXPIRE_MINUTES configuration
  • Subject: The token’s sub claim contains the user’s email address
  • Refresh: Use the Refresh Token endpoint to obtain a new access token before expiration

Error Responses

Status CodeDescription
200Successful authentication, returns access token
401Invalid credentials (incorrect email or password)
422Validation error (missing or invalid request fields)

Build docs developers (and LLMs) love