await embedded.init() to establish the postMessage bridge with the Salla Dashboard.embedded.auth.getToken() to extract the short-lived token from the URL.embedded.ready().embedded.auth and core modules provide several helpers to manage the lifecycle:POSThttps://api.salla.dev/exchange-authority/v1/introspectS-Source: YOUR_APP_ID{
"token": "em_tok_..."
}{
"status": 200,
"success": true,
"data": {
"merchant_id": 123456,
"user_id": 987654,
"exp": "2026-01-19T12:00:00Z"
}
}401 Unauthorized or indicates the token has expired, you should initiate the refresh flow:S-Source HeaderApp ID in the S-Source header. This prevents other apps from trying to verify tokens against your identity.embedded.ready()ready(). If your authentication fails, use embedded.destroy() to exit gracefully rather than leaving the merchant on a hung loading screen.