---
updatedAt: 2026-04-20T20:26:21.000Z
agentTools:
  projectIndex: https://docs.wistia.com/llms.txt
---

# Create Expiring Access Token

```
🚫 Alert
This API is still under development and can change at any time.
```

This endpoint is for creating expiring access tokens which can be used for some iframe embeds
and, when granted the `all:delegate_to_contact_permissions` scope, for REST API requests
authorized by the token's authorizations.

## Requires api token with one of the following permissions
```
Read, update & delete anything
```

Tokens with the "Act with a team member's permissions" permission
(`all:delegate_to_contact_permissions` scope) can also be used. Requests
made with such a token are authorized using the permissions of the
contact assigned to the token.


# OpenAPI definition

````json
{
  "openapi": "3.1.1",
  "info": {
    "title": "Data API",
    "description": "Wistia Data API",
    "version": "2026.09.0"
  },
  "servers": [
    {
      "url": "https://api.wistia.com/modern"
    }
  ],
  "security": [
    {
      "BearerAuth": []
    }
  ],
  "tags": [
    {
      "name": "Expiring Access Tokens"
    }
  ],
  "paths": {
    "/expiring_token": {
      "post": {
        "summary": "Create Expiring Access Token",
        "x-speakeasy-group": "expiringAccessTokens",
        "x-speakeasy-name-override": "create",
        "x-cli-topic-override": "expiring-tokens",
        "description": "```\n🚫 Alert\nThis API is still under development and can change at any time.\n```\n\nThis endpoint is for creating expiring access tokens which can be used for some iframe embeds\nand, when granted the `all:delegate_to_contact_permissions` scope, for REST API requests\nauthorized by the token's authorizations.\n\n## Requires api token with one of the following permissions\n```\nRead, update & delete anything\n```\n\nTokens with the \"Act with a team member's permissions\" permission\n(`all:delegate_to_contact_permissions` scope) can also be used. Requests\nmade with such a token are authorized using the permissions of the\ncontact assigned to the token.\n",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "unevaluatedProperties": false,
                "type": "object",
                "properties": {
                  "expiring_access_token": {
                    "unevaluatedProperties": false,
                    "type": "object",
                    "properties": {
                      "expires_at": {
                        "description": "an ISO8601 string of when the token will expire, defaults to two days from creation",
                        "type": "string",
                        "format": "iso8601"
                      },
                      "scopes": {
                        "description": "The scopes the token will be granted. `graphql:all` allows GraphQL requests (e.g. the embedded transcript editor) and `all:delegate_to_contact_permissions` allows REST API requests authorized by the token's authorizations. Defaults to `[\"graphql:all\"]` when omitted.",
                        "type": "array",
                        "default": [
                          "graphql:all"
                        ],
                        "items": {
                          "type": "string",
                          "examples": [
                            "graphql:all",
                            "all:delegate_to_contact_permissions"
                          ]
                        }
                      },
                      "authorizations": {
                        "description": "The rules the token carries. Each rule names one object by `type` and `id`\nand lists the `permissions` granted on it.\n\nAny permission implicitly allows viewing the object; every other permission\nmust be declared explicitly.\n",
                        "type": "array",
                        "items": {
                          "unevaluatedProperties": false,
                          "type": "object",
                          "properties": {
                            "type": {
                              "description": "The type of object the rule names.",
                              "type": "string",
                              "enum": [
                                "media",
                                "folder",
                                "account",
                                "webinar",
                                "channel",
                                "review-bundle",
                                "brand"
                              ]
                            },
                            "id": {
                              "description": "The id of the object the rule names: its hashed id, except for an `account`, which uses its numeric `id` (as returned by `GET /modern/account`) and must be the token's own account.",
                              "type": "string"
                            },
                            "permissions": {
                              "description": "The permissions granted on the object, by type:\n\n- `media`: `show`, `update`, `destroy`, `edit-transcripts`, `view-stats`,\n  `edit`, `share`, `translate`, `order-audio-descriptions`, `create-transcripts`.\n  `edit` allows changing the media's player customizations. `edit-transcripts`\n  also lists and shows the media's localizations, and deletes them together\n  with `update`; no other permission reaches a media's localizations.\n  `translate` orders localizations (dubs). Any permission lists and shows the\n  media's extended audio descriptions, `update` deletes them and\n  `order-audio-descriptions` orders one. `edit-transcripts` is the only\n  permission that also reaches the media's captions and speaker data; `show`,\n  `update` and `destroy` apply to the media itself and never to those nested\n  resources. `create-transcripts` allows uploading and purchasing captions for\n  the media without reading or editing existing ones. `share` allows adding\n  the media to a new review bundle.\n- `folder`: `show`, `update`, `destroy`, `upload`, `share`, `view-stats`. A rule\n  also covers the folder's subfolders: any permission lists and shows them,\n  and `update` creates, renames and deletes them. It also covers the folder's\n  sharings: any permission lists and shows them, `share` creates them, and\n  `update` edits and deletes them. `upload` also allows restoring deleted\n  media into the folder.\n- `account`: `create-folders`, `create-channels`, `create-webinars`,\n  `view-stats`, `manage-team`, `view-speakers`, `view-tags`, `manage-tags`,\n  `manage-allowed-domains`, `manage-deleted-media`, `create-brands`,\n  `manage-brand-preload`. `manage-team` allows\n  inviting contacts to the account. `view-speakers` lists the account's\n  speaker profiles. `view-tags` lists the account's tags, and `manage-tags`\n  also creates and deletes them. `manage-allowed-domains` lists, shows, adds\n  and deletes the account's allowed domains; without it a token sees none.\n  `manage-deleted-media` allows listing and restoring the deleted media the\n  token's media rules name. `create-brands` allows creating brands, and\n  `manage-brand-preload` allows updating the brand preload.\n- `webinar`: `show`, `update`, `destroy`, `view-stats`. A rule also covers\n  the webinar's registrations and collaborators: any permission lists its\n  registrations, and `update` registers attendees and lists, invites and\n  removes collaborators.\n- `channel`: `show`, `update`, `destroy`. A rule also covers the channel's\n  episodes and collaborators: any permission lists and shows its episodes,\n  and `update` adds, edits, publishes, unpublishes and removes episodes and\n  lists, invites and removes collaborators.\n- `review-bundle`: `show`, `destroy`. Creating a review bundle needs no\n  rule on a review bundle; it needs `share` on every media in it.\n- `brand`: `show`, `update`, `destroy`. Applying the brand to a media,\n  folder or channel takes `update` on the brand and an `update` rule\n  naming that media, folder or channel.\n",
                              "type": "array",
                              "items": {
                                "type": "string",
                                "examples": [
                                  "show",
                                  "update",
                                  "destroy",
                                  "edit-transcripts",
                                  "view-stats",
                                  "share",
                                  "translate",
                                  "create-folders",
                                  "create-channels",
                                  "create-webinars",
                                  "manage-team",
                                  "edit",
                                  "order-audio-descriptions",
                                  "create-transcripts",
                                  "view-speakers",
                                  "view-tags",
                                  "manage-tags",
                                  "manage-allowed-domains",
                                  "upload",
                                  "manage-deleted-media",
                                  "create-brands",
                                  "manage-brand-preload"
                                ]
                              }
                            }
                          },
                          "required": [
                            "type",
                            "id",
                            "permissions"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "unevaluatedProperties": false,
                  "type": "object",
                  "properties": {
                    "token": {
                      "description": "A token which can be used to authorize requests to Wistia. With the `graphql:all` scope it authorizes GraphQL requests such as transcript embeds; with the `all:delegate_to_contact_permissions` scope it can also be used as a bearer token for REST API requests authorized by the token's authorizations.",
                      "type": "string"
                    }
                  },
                  "required": [
                    "token"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized, invalid or missing token",
            "content": {
              "application/json": {
                "schema": {
                  "unevaluatedProperties": false,
                  "type": "object",
                  "properties": {
                    "code": {
                      "description": "A machine-readable identifier for the specific authorization failure.",
                      "type": "string",
                      "enum": [
                        "unauthorized_credentials",
                        "account_inactive",
                        "unauthorized_scope",
                        "unauthorized_params"
                      ]
                    },
                    "error": {
                      "type": "string",
                      "examples": [
                        "Invalid credentials."
                      ]
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable entity, the request parameters were invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "unevaluatedProperties": false,
                  "type": "object",
                  "properties": {
                    "error": {
                      "description": "A single error message describing what went wrong.",
                      "type": "string"
                    },
                    "errors": {
                      "description": "Array of error messages describing what went wrong.",
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "examples": [
                        [
                          "Title is required",
                          "Event duration must be at least 15 minutes"
                        ]
                      ]
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "unevaluatedProperties": false,
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "examples": [
                        "Internal server error"
                      ]
                    }
                  }
                }
              }
            }
          },
          "501": {
            "description": "Not implemented - expiring tokens cannot be created from other expiring tokens",
            "content": {
              "application/json": {
                "schema": {
                  "unevaluatedProperties": false,
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "examples": [
                        "Expiring tokens can only be created from non-expiring access tokens."
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Expiring Access Tokens"
        ],
        "parameters": [
          {
            "name": "X-Wistia-API-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "default": "2026-09"
            }
          }
        ],
        "x-readme": {
          "code-samples": [
            {
              "name": "Typescript (SDK)",
              "language": "javascript",
              "code": "import { Wistia } from \"@wistia/wistia-api-client\";\n\nconst wistia = new Wistia({\n  bearerAuth: process.env[\"WISTIA_BEARER_AUTH\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await wistia.expiringAccessTokens.create({\n    expiringAccessToken: {\n      scopes: [\n        \"graphql:all\",\n        \"all:delegate_to_contact_permissions\",\n      ],\n      authorizations: [\n        {\n          type: \"account\",\n          id: \"<id>\",\n          permissions: [\n            \"show\",\n            \"update\",\n            \"destroy\",\n            \"edit-transcripts\",\n            \"create-folders\",\n          ],\n        },\n      ],\n    },\n  });\n\n  console.log(result);\n}\n\nrun();"
            }
          ]
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  },
  "x-readme": {
    "samples-languages": [
      "javascript",
      "shell",
      "node",
      "python",
      "ruby"
    ]
  }
}
````