---
title: "Get JWT token"
method: POST
path: "/api-login"
tags: ["Login"]
---

# Get JWT token

`POST /api-login`

## Request

- Base URL: `https://studio.edgeimpulse.com/v1`
- URL: `https://studio.edgeimpulse.com/v1/api-login`
- Auth: none required
- TypeScript: <https://skmtc.dev/edgeimpulse/apis/edge-impulse-api/docs/api-login/post.ts> (a function with typed inputs; its response is checked against the schema)

Get a JWT token to authenticate with the API.

## Request body

- GetJWTRequest
  - `username` string, required: Username or e-mail address
  - `password` string, required: Password
  - `uuid` string: Evaluation user UUID
  - `ssoType` 'browser' | 'cli'
  - `sessionId` string: Session ID
  - `totpToken` string: TOTP Token. Required if a user has multi-factor authentication with a TOTP token enabled. If a user has MFA enabled, but no totpToken is submitted; then an error starting with "ERR_TOTP_TOKEN IS REQUIRED" is returned. Use this to then prompt for an MFA token and re-login.

## Response `200`

OK

- GetJWTResponse
  - `success` boolean, required: Whether the operation succeeded
  - `error` string: Optional error description (set if 'success' was false)
  - `token` string: JWT token, to be used to log in in the future through JWTAuthentication
  - `redirectUrl` string: Redirect URL to follow to complete login

---

[API](https://skmtc.dev/edgeimpulse/apis/edge-impulse-api.md) - [All operations](https://skmtc.dev/edgeimpulse/apis/edge-impulse-api/llms.txt) - [OpenAPI document](https://skmtc.dev/edgeimpulse/apis/edge-impulse-api/revisions/e2a976d38427?raw)
