API reference
Design
Platform
getDesignToken
API reference for the getDesignToken method.
This version of the API is deprecated. This version will soon be unsupported. You should use a stable version of the API in your app.
Gets a JSON Web Token (JWT) for the current design.
To learn more, see Using design IDs.
Usage
import { getDesignToken } from "@canva/design";const token = await getDesignToken();console.log(token);
TS
Returns
A Promise
that resolves with the following string:
result
string
REQUIRED
The JSON Web Token for the current design.
When decoded and verified, an object is returned with the following properties:
aud
- The ID of the app.designId
- The ID of the current design.