https://discord.gg/botpress logo
Hello everyone, I’ve been stuck for almost two we...
# šŸ’»developers
h
Hello everyone, I’ve been stuck for almost two weeks trying to retrieve user conversations using the @botpress/client Node module, but I can’t figure out how to make it work properly. Here's the situation: I’m using the botpressID for my users, which I generate with the createUser API call. This botpressID is also what I pass in my requests to create conversations. I can see that conversations are being correctly associated with the user ID, but there’s no way to fetch conversations for a specific user without retrieving all conversations. Here’s what I’m trying to do: const conversationResponse: any = await client.listConversations(botpressID); Unfortunately, this doesn’t work as expected. Here’s how I’ve also tried (using the API endpoint from the docs): Params sent in the request: x-integration-id: My personal token generated in Botpress. Bot ID: I used the hashed bot ID found in the URL after api.botpress.cloud/workspaces/.../bots/(botId). Response I get: { "id": "err_20241126024320xDFDB182F", "code": 401, "type": "Unauthorized", "message": "Request is missing a valid authentication token" } I even tried using the Client ID from the advanced settings instead of the x-integration-id, but I keep getting the same unauthorized message. I’m really lost at this point, and it’s blocking me from delivering my product. Is there anyone who has successfully managed to fetch conversations for a specific user or has insight on what I might be doing wrong? Any help would be greatly appreciated!
2 Views