---
title: "Issues agent access tokens (RFC 6749 sections 4.1.3 and 6)."
method: POST
path: "/oauth/token"
tags: ["oauth"]
---

# Issues agent access tokens (RFC 6749 sections 4.1.3 and 6).

`POST /oauth/token`

## Request

- Base URL: `https://api.pricklymails.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.pricklymails.com/oauth/token`
- Auth: none declared

## Response `200`

Agent session token issued.

- TokenResponse: `POST /oauth/token` success response body (RFC 6749 section 5.1).
  - `access_token` string, required: The agent's short-lived access token (a JWT), sent as a Bearer credential.
  - `expires_in` integer, required: Seconds until `access_token` expires.
  - `refresh_token` string, required: A freshly minted refresh token (RFC 6749 section 5.1), issued on every successful grant (both `authorization_code` and `refresh_token`).
  - `scope` string, required: The granted scopes, space-delimited (RFC 6749 section 5.1): the agent's own current scopes.
  - `token_type` string, required: Always `"Bearer"`.

## Other responses

- `400`: RFC 6749 error response.

---

[API](https://skmtc.dev/pricklymails/apis/pricklymails-api.md) · [All operations](https://skmtc.dev/pricklymails/apis/pricklymails-api/llms.txt) · [OpenAPI document](https://skmtc.dev/pricklymails/apis/pricklymails-api/revisions/b4225a92d8fb?raw)
