---
title: "Get Access Token From User/Pass"
method: POST
path: "/tokens"
tags: ["Authentication/Access Token (Oauth - Username/Password)"]
---

# Get Access Token From User/Pass

`POST /tokens`

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

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