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!