---
title: "Create JWT token From User/Pass"
method: POST
path: "/jwt"
tags: ["Authentication/JWT (JSON Web Token)"]
---

# Create JWT token From User/Pass

`POST /jwt`

This API will accept username and password and generate a JWT token.

## Request body

- AuthRequest
  - `grant_type` 'password' | 'refresh_token' | 'mfa', required — This is the type of authentication request being made. 'password' is most common if using username and password from end user to grant access.
  - `client_id` string, required — This is the client_id provided to the developer for accessing the api. Will match with the client_secret
  - `client_secret` string, required — This is the client_secret provided to the developer for accessing the api. Will match with the client_id
  - `username` string, required — This is the username and logic for the user. This may look like a uid (user@domain) or could be something else if setup diffferent including a email address potentially.
  - `password` string, password, required — This is the password for the user requesting access.

## Response `200`

- JwtRequestSuccess
  - `token` string, jwt, required — This is the JWT token that would need to be saved for use in addtional requests.
  - `refresh` string, jwt, required — This is a JWT but only capable of being used to regenerate a new JWT token and not for authenticated requests.

## Other responses

- `400`
- `401`
- `403`
- `404`
- `x-400-2`

---

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