On September 25th, 2024, we released v2 of the Apps SDK. To learn what’s new and how to upgrade, see Migration FAQ and Migration guide.

auth.getCanvaUserToken

API reference for the auth.getCanvaUserToken method.
This version of the API is in beta. Beta APIs are unstable and may change without warning. You can't release public apps using this API until it's stable.

Returns a JSON Web Token (JWT) that contains information about the current user.

This token must be decoded and verified via the app's backend.

The verified token is an object with the following properties:

  • appId - The ID of the app.
  • teamId - The ID of the user's team.
  • userId - The ID of the user.

To learn how to decode and verify JWTs, see JSON Web Tokens.

Returns

A JSON Web Token (JWT) that contains information about the current user.

Promise<CanvaUserToken>