Trying to inject auth tokens into the Genesys web messaging widget via the JS SDK. Calling genesys.cloud.messenger.setGuestAttributes({ auth: 'token' }) after genesys.cloud.messenger.init() works locally, but the attributes don’t show up in the CXone conversation context when the chat actually starts. The SDK logs show the call succeeded, but the server-side event payload is missing the custom data. Is there a specific timing issue or a different method I should be using to persist these attributes before the first message is sent?
Docs state: “Custom attributes must be set before the session is established.” setGuestAttributes after init is too late for the initial handshake. You’ll need to pass them in the config object during initialization instead.
genesys.cloud.messenger.init({
guestAttributes: { auth: 'token' }
});