---
title: "Request an OIDC token"
method: POST
path: "/v1/tokens/oidc"
tags: ["Tokens"]
---

# Request an OIDC token

`POST /v1/tokens/oidc`

Request an Open ID Connect token for your machine. Customize the audience claim with the `aud` parameter. This returns a JWT token. Learn more about [using OpenID Connect](/docs/reference/openid-connect/) on Fly.io.

## Request body

- CreateOIDCTokenRequest — Optional parameters
  - `aud` string
  - `aws_principal_tags` boolean

## Response `200`

OIDC token

## Other responses

- `400` — Bad Request

## Changes

- **2026-09-01** `fc09da744e5d` — 1 warning
  - added the new `volume_placement_capacity` enum value to the `status` response property for the response status `400`
- **2026-08-20** `9e6a180c40a3` — 1 warning
  - added the new `name_taken` enum value to the `status` response property for the response status `400`
- **2026-08-12** `f54480c4ce7f` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/machines/apis/machines-api/changes/v1/tokens/oidc/post.md)

---

[API](https://skmtc.dev/machines/apis/machines-api.md) · [All operations](https://skmtc.dev/machines/apis/machines-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/machines/machines-api/revisions/7fbf11019d4d/schema)
