---
title: "Token"
method: POST
path: "/v1/oauth/token"
tags: ["agent-auth"]
---

# Token

`POST /v1/oauth/token`

## Request

- Base URL: `https://api.rmfg.com`
- URL: `https://api.rmfg.com/v1/oauth/token`
- Auth: none required

Exchange authorization_code + code_verifier, device_code, or refresh_token.

Send application/x-www-form-urlencoded. A refresh token is rotated on every
use; serialize refreshes and save the new token. Reuse revokes the connection.
Refresh may request the same or fewer approved scopes. A narrower access
token does not narrow the connection or its replacement refresh token.

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

- object
  - `client_id` string, required
  - `grant_type` 'authorization_code' | 'refresh_token' | 'urn:ietf:params:oauth:grant-type:device_code', required
  - `code` string: Required for authorization_code.
  - `redirect_uri` string: Exact registered callback; required for authorization_code.
  - `code_verifier` string: Required for authorization_code.
  - `device_code` string: Required for device authorization.
  - `refresh_token` string: Required for refresh_token. Single use; persist its replacement.
  - `scope` string: Optional for refresh_token: the same or fewer approved permissions. Omit to retain the original grant.
  - `resource` string: Optional; must equal the API origin.

## Response `200`

API-only access and rotating refresh token.

- object
  - `access_token` string, required
  - `refresh_token` string, required
  - `token_type` 'Bearer', required
  - `expires_in` integer, required
  - `scope` string, required: Granted permissions; may omit requested payments.

## Changes

- **2026-09-07** `8423a56e45c0`: 1 info
  - added the new optional request property `scope`
- **2026-09-07** `35a1cd3bea64`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/rmfg/apis/rmfg-manufacturing-api/changes/v1/oauth/token/post.md)

---

[API](https://skmtc.dev/rmfg/apis/rmfg-manufacturing-api.md) - [All operations](https://skmtc.dev/rmfg/apis/rmfg-manufacturing-api/llms.txt) - [OpenAPI document](https://skmtc.dev/rmfg/apis/rmfg-manufacturing-api/revisions/078f984358b9?raw)
