---
title: "Get access and refresh tokens."
method: POST
path: "/auth/token"
tags: ["auth"]
---

# Get access and refresh tokens.

`POST /auth/token`

## Query parameters

- `useCookie` boolean

## Response `200`

OK

- TokenResponseDTO
  - `access_token` string
  - `token_type` string
  - `expires_in` integer
  - `refresh_token` string
  - `scope` string
  - `user` UserDTO
    - `name` string
    - `roles` string[]

## Other responses

- `400` — Invalid request parameters

---

[API](https://skmtc.net/openhab/apis/openhab-rest-api.md) · [All operations](https://skmtc.net/openhab/apis/openhab-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/openhab/openhab-rest-api/revisions/0f2ce17cab3e/schema)
