---
title: "Gets a user access token"
method: POST
path: "/users/v2/login"
tags: ["Users"]
---

# Gets a user access token

`POST /users/v2/login`

Authenticates a user with an email and a password and gets a user access token upon the successful authentication.
The user email must be registered with a valid [HERE Account](https://account.here.com).
Optionally user can provide requested realm ID.

## Request body

- object — An object containing user's email address, password and (optionally) requested realm ID.
  - `email` string, required — The email address of the user
  - `password` string, required — The password of the user
  - `realm` string — A case-insensitive requested realm ID

## Response `200`

Success

The authentication was successful and a valid access token was returned.

- object
  - `accessToken` string
  - `expiresIn` integer — The lifetime in seconds of the access token. For example 86400 means the token will expire in 24 hours from the time the response was generated.
  - `realm` string — Current realm ID
  - `refreshToken` string
  - `tokenType` string — The token type is bearer
  - `userId` string — The HERE Account ID of a user.

## Other responses

- `400` — Bad request The request object is in an incorrect format or has values that are invalid or out of range. If available, further error details are provided in the response body.
- `401` — Unauthorized The request did not provide correct authentication details
- `403` — Forbidden The account does not have the correct privileges

---

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