---
title: "OAuth2 token"
method: POST
path: "/api/v2/auth/token"
tags: ["auth"]
---

# OAuth2 token

`POST /api/v2/auth/token`

## Request

- Base URL: `https://api.momence.com`
- URL: `https://api.momence.com/api/v2/auth/token`
- Auth: HTTP basic

Obtain a new access token

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

- union
  - AuthTokenPasswordRequestDto
    - `grant_type` 'password', required
    - `username` string, required
    - `password` string, required
  - AuthTokenRefreshTokenRequestDto
    - `grant_type` 'refresh_token', required
    - `refresh_token` string, required
  - AuthTokenAuthorizationCodeRequestDto
    - `grant_type` 'authorization_code', required
    - `code` string, required
    - `redirect_uri` string, required

## Response `200`

- AuthTokenDto
  - `accessToken` string, required
  - `access_token` string, required
  - `accessTokenExpiresAt` string, date-time, required
  - `refreshToken` string, required
  - `refresh_token` string, required
  - `refreshTokenExpiresAt` string, date-time, required

---

[API](https://skmtc.dev/momence/apis/momence-public.md) - [All operations](https://skmtc.dev/momence/apis/momence-public/llms.txt) - [OpenAPI document](https://skmtc.dev/momence/apis/momence-public/revisions/5adb9a85439b?raw)
