---
title: "Authenticate user and generate JWT token"
method: POST
path: "/v1/login"
tags: ["Authentication"]
---

# Authenticate user and generate JWT token

`POST /v1/login`

Use this route to request an API token that can be used for requests. Token expires in 7 days. Should you get a 401 back, from the API, request a new token.

## Request body

- LoginRequest
  - `username` string, required — Username to use for authentication
  - `password` string, required — Password to use for authentication

## Response `200`

OK

- LoginResponse
  - `token` string — JWT token to use for authenticated requests

## Other responses

- `400` — Invalid or missing request parameters
- `401` — Authentication failed
- `500` — Unable to authenticate

---

[API](https://skmtc.net/rocket/apis/rocket-net-api.md) · [All operations](https://skmtc.net/rocket/apis/rocket-net-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/rocket/rocket-net-api/revisions/db0dcbbc5764/schema)
