Themes built on the Twig templating engine are now deprecated and require migration to Vitrin to ensure continued support and compatibility with Zid.
embedded_apps_tokens_write scope in your initial OAuth request. After your app completes the OAuth flow, redirect the merchant to the Zid Dashboard embedded app route to open the app inside the dashboard.:?code=.... Exchange it for tokens:access_token, authorization, and refresh_token in your database, associated with this merchant's store_id.authorization JWT β JWTs are too long and will fail due to URL truncation when passed to the iframe.https://your-app.com/embedded).token query parameter.store_id and stored tokens.https://dashboard.zid.sa/{language_code}/stores/{store_id}/apps/{app_id}/embeddedhttps://dashboard.zid.sa/ar-sa/stores/1/apps/4820/embedded{app_id} must be your actual Zid app ID.{store_id} can contain any valid value.{language_code} can contain any supported dashboard language value, such as ar-sa.Content-Security-Policy:
style-src 'self' 'unsafe-inline' *;
font-src 'self' 'unsafe-inline' data: *;
default-src 'self' *.zid.dev web.zid.sa dashboard.zid.sa;
script-src 'self' 'unsafe-inline' *;
frame-ancestors 'self' *.zid.dev web.zid.sa dashboard.zid.sa;
connect-src 'self' 'unsafe-inline' *Note: Without the frame-ancestorsdirective, Zid's dashboard will block the iframe.
embedded_apps_tokens_write scope must be present in the initial OAuth redirect.access_token and authorization securely on your server β never expose them to the browser or iframe HTML.Zid Embedded App Starter β Authorization A minimal Flask starter for the Zid Embedded Apps OAuth authorization flow. Implements steps 1β6 of the Embedded Apps Authentication Flow β install, token exchange, UUID registration, and iframe rendering β so you can focus on building your app logic. Community project β open source, open for improvements. This is not an official Zid package. Contributions and forks are welcome.