ComponentToken
A ComponentToken is a short-lived credential for embedded public components. Pass the returned token to the widget or component that needs it.
Component tokens are expected to last about one hour, but integrations should use expiresIn and expiresAt as the source of truth for token lifetime and refresh timing.
Fields
| Field | Type | Description |
|---|---|---|
token | String! | Bearer token to pass to public components for authorized AppSync calls |
tokenType | String! | Token scheme for the Authorization header. Currently always Bearer |
expiresIn | Int! | Number of seconds until the token expires |
expiresAt | AWSDateTime! | Absolute expiry time for the token |
Example
mutation GenerateViewerToken {
generateComponentToken(input: {
component: LS_DOCUMENT_VIEWER
}) {
token
tokenType
expiresIn
expiresAt
}
}