API reference
Design
addAudioTrackaddElementAtCursoraddElementAtPointaddNativeElementaddPagecreateRichtextRangeeditContentgetCurrentPageContextgetDefaultPageDimensionsgetDesignMetadatagetDesignTokeninitAppElementopenDesignoverlay.registerOnCanOpenrequestExportselection.registerOnChangesetCurrentPageBackgroundui.startDragToCursorui.startDragToPointui.startDrag
Error
Intents
Intents: Content
Intents: data
Intents: design
Platform
appProcessappProcess.broadcastMessageappProcess.currentappProcess.current.getInfoappProcess.current.requestCloseappProcess.current.setOnDisposeappProcess.requestCloseappProcess.registerOnMessageappProcess.registerOnStateChangefeatures.isSupportedfeatures.registerOnSupportChangegetPlatformInfonotification.addToastrequestOpenExternalUrlChangelog
auth.getCanvaUserToken
API reference for the auth.getCanvaUserToken method.
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:
aud- The ID of the app.brandId- 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.
Usage: Get a JWT that contains information about the current user
import { auth } from '@canva/user';const token = await auth.getCanvaUserToken();
TYPESCRIPT
Returns
A JSON Web Token (JWT) that contains information about the current user.
Promise<CanvaUserToken>
Rate limit
This method has a rate limit of 10 requests every 10 seconds.