🚀 Heads up: Our API Docs Have Moved!
We have relocated to Instructure Developer Documentation Portal. 🎉 Please update your bookmarks. This page will automatically redirect after July 1, 2026.

Platform Tokens API

Short term platform tokens that federated modules running inside the Canvas UI use to call services other than Canvas. They are minted from the user's Canvas session, cannot be refreshed, and never target Canvas itself.

A PlatformToken object looks like:

{
  // The signed platform token (a JWT)
  "token": null
}

Create a platform token PlatformTokensController#create

POST /api/v1/platform_tokens

Scope: url:POST|/api/v1/platform_tokens
Mints a platform token for the current user from their Canvas session. Only developer keys with `session_token` in their authorized flows can be named, and only for the audiences and scopes registered on that key. The token has no refresh token; request a new one with the session when it expires.

Request Parameters:

Parameter Type Description
client_id Required string The global id of the developer key the token is issued to.
resource Required string The audience(s) of the token. Each must be one of the key's allowed audiences. Canvas itself is never a valid audience.
scopes Required string The scopes to request, space separated or as an array. Each must be one of the scopes on the developer key.

Example Request:

curl 'https://<canvas>/api/v1/platform_tokens' \
      -X POST \
      -H 'X-CSRF-Token: <csrf token>' \
      -H 'Cookie: <canvas session>' \
      -d 'client_id=<key id>' \
      -d 'resource=https://service.example.com'
Returns a PlatformToken object