Tokens

You can use the Tokens resource to request an OpenID Connect (OIDC) token from a 3rd-party service. Learn more about using OpenID Connect on Fly.io.

Request an OIDC token

Request an Open ID Connect token for your Machine. Customize the audience claim with the aud parameter. This returns a JWT token.

Responses
200 :

OIDC token

POST/v1/tokens/oidc
curl -i -X POST \\
    -H "Authorization: Bearer ${FLY_API_TOKEN}" -H "Content-Type: application/json" \\
    "${FLY_API_HOSTNAME}/v1/tokens/oidc" \\
  -d '{
      "aud": "https://fly.io/my-org-slug",
    }'
Status: 200 OK - Example response
<raw oidc token>