---
title: "Issues new or Refreshes existing token"
method: POST
path: "/auth/realms/{realm}/protocol/openid-connect/token"
tags: ["token"]
---

# Issues new or Refreshes existing token

`POST /auth/realms/{realm}/protocol/openid-connect/token`

## Request

- The document declares no server URL.
- Auth: none declared

Issues new or Refreshes existing token

## Path parameters

- `realm` string, required

## Request body `application/x-www-form-urlencoded`

- DtoTokenGenerationData
  - `client_id` string
  - `client_secret` string
  - `grant_type` string
  - `password` string
  - `refresh_token` string
  - `scope` string
  - `username` string

## Response `200`

OK

- DtoToken
  - `access_token` string
  - `expires_in` integer
  - `not-before-policy` integer
  - `refresh_expires_in` integer
  - `refresh_token` string
  - `scope` string
  - `session_state` string
  - `token_type` string

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `404`: Not Found

## Changes

- **2024-03-06** `8b4a5cf61c3c`: 1 info
  - endpoint added
- **2024-03-06** `4009b08a3a5a`: 1 breaking
  - api path removed without deprecation

[Operation history](https://skmtc.dev/wissance/apis/wissance-ferrum-api/changes/auth/realms/:realm/protocol/openid-connect/token/post.md)

---

[API](https://skmtc.dev/wissance/apis/wissance-ferrum-api.md) - [All operations](https://skmtc.dev/wissance/apis/wissance-ferrum-api/llms.txt) - [OpenAPI document](https://skmtc.dev/wissance/apis/wissance-ferrum-api/revisions/45bad8274649?raw)
