Zum Hauptinhalt springen

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

FieldTypeDescription
tokenString!Bearer token to pass to public components for authorized AppSync calls
tokenTypeString!Token scheme for the Authorization header. Currently always Bearer
expiresInInt!Number of seconds until the token expires
expiresAtAWSDateTime!Absolute expiry time for the token

Example

mutation GenerateViewerToken {
generateComponentToken(input: {
component: LS_DOCUMENT_VIEWER
}) {
token
tokenType
expiresIn
expiresAt
}
}

Export This Article

Save a copy of this page as PDF or plain text.