Loading API Channel userIds in the Webchat
# 🤝help
n
What I want to do: Currently, users interact with bots on a mobile client via the API. It saves their user IDs on the botpress DB so the bot can address them using thier user variables. I want to be able to open up a webchat for an existing API user and have the user variables available to botpress to converse with the user on the web channel. What I expect should happen: I initialise the botpressWebchat using the init() method, and pass the host, botId and userId fields. The bot then loads the user in question and knows their user variables. What's happening instead: The userId parameter is ignored, and instead a string is generated for the userId on the botpress backend and I get a brand new user. Many Thanks for any help.
Just to clarify, I'm using v12, not BPCloud
c
Hey @narrow-vase-25964 - I would recommend posting this in the v12 channel !
n
Hi Sabrina, sorry I didn't see that channel when I went to post. I will move it there now. Thank you!
c
No worries at all 😊
2 Views