Hey Vivek - I'm working on something similar. The chat API is a much simpler API than botpress. The botpress API exposes endpoints to customise and manage the bot itself, whereas the chat api is more focussed on managing conversations.
The error you're seeing is likely due to calling connect() with no user id. If you want to connect with a pre-existing user you need to provide userId and a key signature (which you configure in the chat integration setup)