Authentication
For Frontend API - JWT Authentication
{
"iss": "partner_id", // Partner ID
"exp": 1716123456, // Expiration Time
"iat": 1716113456, // The time at which the JWT was issued.
"aud": "Yofi", // Audience, case-sensitive
"sub": "the-shopify-store.myshopify.com" // Shopify shop url, without https://
}
const message = {
type: 'SET_TOKEN',
data: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJwYXJ0bmVyX2lkIiwiYXVkIjoiWW9maSIsInN1YiI6InRoZS1zaG9waWZ5LXN0b3JlLm15c2hvcGlmeS5jb20iLCJleHAiOjE3NDM1ODkwMTcsImlhdCI6MTcxNTk0MzI4OX0.P5utgEsZo1i_h_kAhvapMESTwF3_-queBmU1xpPKhUQ'
};
iframeRef.current.contentWindow.postMessage(message, 'THE-EMBED-ORIGIN');For Webhook API
Sending Data to Yofi
Yofi API WebhooksReceiving Data from Yofi
Receive data via WebhookLast updated
Was this helpful?