---
title: "Create an auth token"
method: POST
path: "/auth/token"
tags: ["Authentication"]
---

# Create an auth token

`POST /auth/token`

<html><body> vRealize Network Insight supports token based authentication.Tokens are non-modifiable identifiers returned by the system when the user has successfully authenticated using valid credentials. Token expires after expiry time returned in the response. All API requests must provide the auth token in Authorization header in following format.<br> Authorization &#58; NetworkInsight {token} <br> If a token is invalid or expired, 401-Unauthorized error gets returned in the response of the API request. </body></html>

## Request body

- UserCredential
  - `domain` Domain
    - `domain_type` 'LDAP' | 'LOCAL'
    - `value` string — domain value, not required for LOCAL domain
  - `password` string
  - `username` string

## Response `200`

Success

- Token
  - `expiry` integer — expiry epoch time in secs.
  - `token` string

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `500` — Internal Error

---

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