Share the same chat session across PWA and mobile SDK

How can we share the same chat session history across PWA and mobile SDK?

1 Like

Hey @Shraeyas,

You can use the same ymAuthenticationToken on PWA that you used for the mobile SDK.

Here’s the documentation on how to use ymAuthenticationToken with mobile SDK if you have not implemented this yet. iOS Chatbot SDK | yellow.ai

You can add the same ymAuthenticationToken at the end of the PWA URL to get the same chat session history.

https://cloud.yellow.ai/pwa/v2/live/<your_bot_id>?ymAuthenticationToken=<your_user_token>

3 Likes

@Adithya_N_R How do we add this token to PWA script?

For PWAs, you will have to pass the ymAuthenticationToken in the URL as a query parameter.

https://cloud.yellow.ai/pwa/v2/live/<your_bot_id>?ymAuthenticationToken=<your_user_token>

1 Like

And what if we are using a script to integrate the chatbot?

You can pass the token inside window.ymConfig in that script

window.ymConfig = {
  ymAuthenticationToken: “your_unique_token”
}
1 Like

Got it. Thanks a lot @Adithya_N_R