---
title: "Login with email and password → JWT"
method: POST
path: "/auth/login"
tags: ["Auth"]
---

# Login with email and password → JWT

`POST /auth/login`

## Request

- Base URL: `https://opnplatform.com/api`
- URL: `https://opnplatform.com/api/auth/login`
- Auth: none declared

## Request body

- object
  - `email` string, email, required
  - `password` string, required

## Response `200`

JWT token + user object

- AuthResponse
  - `token` string: JWT for use as Bearer token
  - `user` object: Authenticated user with plan and feature flags
    - `api_access` boolean: True if plan allows opn_ API key usage
    - `credits` integer: Current PACKIQ credit balance
    - `email` string
    - `history_months` integer: Max history depth: 3/12/24/24 by plan tier
    - `id` integer
    - `index_limit` integer, nullable: Max indices from GET /api/indices. null = unlimited (Intelligence).
    - `name` string
    - `plan` 'observer' | 'essential' | 'professional' | 'intelligence' | 'null', nullable
    - `webhook` boolean: True for Intelligence plan

## Other responses

- `401`: Invalid credentials
- `403`: Account suspended

---

[API](https://skmtc.dev/opnplatform/apis/packindex-packiq-api-open-packaging-network.md) · [All operations](https://skmtc.dev/opnplatform/apis/packindex-packiq-api-open-packaging-network/llms.txt) · [OpenAPI document](https://skmtc.dev/opnplatform/apis/packindex-packiq-api-open-packaging-network/revisions/f427c0467bb2?raw)
