TanqoryDocs

tanqoryExtThemePreviewToken

  • Query
  • Content and shop

A preview token for one theme of the store: a signed token (15 minutes) that lets the storefront renderer show the theme even when it is not the published one. The editor puts it in the preview URL and asks again before it expires. Needs a staff session whose token holds write_themes. Null when the theme does not exist in this store.

Arguments

ArgumentTypeRequiredDefault
themeIdID!Required

Returns

TanqoryExtThemePreviewToken

FieldTypeDescription
expiresAtDateTime!

When the token stops working.

previewUrlURL!

The storefront origin to open the preview on, for example https://shop.example.com.

tokenString!

The signed token.

Example request

A starting point: required arguments as variables and a few fields of the result. Replace the placeholders.

Set STORE_ID and TANQORY_ACCESS_TOKEN in your environment first (Make your first API call).

curl
curl -X POST "https://api.tanqory.com/admin/2026-10/stores/$STORE_ID/graphql" \
  -H "Authorization: Bearer $TANQORY_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  --data '{"query":"query TanqoryExtThemePreviewToken($themeId: ID!) {\n  tanqoryExtThemePreviewToken(themeId: $themeId) {\n    expiresAt\n    previewUrl\n    token\n  }\n}","variables":{"themeId":"gid://tanqory/Type/id"}}'

Built from commit c0b3fb3fdef7 · API version 2026-10