botpress/client
# 🤝help
q
Hey botpress team, I'm currently trying to connect my app to a bot I created on botpress studio through the @cold-motherboard-82208/client package, I followed the instructions provided and got this error:
Error: The provided UUID is invalid
. Would appreciate your help.
a
Hey @quaint-accountant-43414, could you share the code you're using to connect the app?
q
Here is the code :
r
the workspace id must be the UUID from the cloud dashboard url
@plain-lifeguard-16679 should we add the workspace ID with a copy button somewhere in the admin panel for devs?
q
Oh I see !
Let me retry this and hope it works
p
The workspaceId you provided is most likely not a valid UUID
q
I was also wondering if there is a way to send custom data to the bot to provide more context before a conversation starts
It works 🥳 ! Thanks so much ! really needed this.
e
I would advise you to have the new Client code outside the useEffect. Otherwise a new client will be created everytime the ChatProvider is rendered, and also the client will only be available inside the useEffect
@quaint-accountant-43414 I like to abstract the client to a src/services/botpress.ts file, then export it to make it available with the same settings throughout my code
q
Thanks, will make the adjustment!
83 Views