---
title: "Get Access Token after MFA request"
method: POST
path: "/tokens#2"
tags: ["Authentication/Access Token (Oauth - Username/Password)"]
---

# Get Access Token after MFA request

`POST /tokens#2`

This API will accept username and password along with a passcode generated via a authenticator application and generate a Access token

## Request body

- AuthRequestMFA
  - `grant_type` 'mfa' | 'password' | 'refresh_token', required — This is the type of authentication request being made. 'mfa' would be needed in the second request with MFA passcode.
  - `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.
  - `mfa_type` string, required — This value will be provided in response to a auth request if MFA is needed. Move value from that token to this request. Likely will be 'authenticator'
  - `mfa_vendor` string, required — This value will be provided in response to a auth request if MFA is needed. Move value from that token to this request. Likely will be 'google'
  - `ns_id_type` 'subscriber' | 'level1', required — Will likely be subscriber as the value here to defierentiate between authenticator for api/portal and mfa with admin ui
  - `passcode` string, required — This will be the 6 digit numberic passcode provided by a
  - `access_token` string, required — This will be the access_token or jwt that was given with the scope of mfa_required

## Response `200`

- AccessToken
  - `username` string, required
  - `user` string, required
  - `territory` string, required
  - `domain` string, required
  - `site` string
  - `group` string
  - `department` string, required
  - `uid` string, required
  - `login` string, required
  - `scope` string, required
  - `user_email` string, required
  - `displayName` string, required
  - `access_token` string, required
  - `expires_in` integer, required
  - `token_type` string, required
  - `refresh_token` string, required
  - `client_id` string, required
  - `apiversion` string, required

## 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)
