Retrieve conversations list
Learn how to retrieve a list of recent conversations.
Read time 1 minuteLast updated 2 days ago
You can retrieve a user’s list of conversations. A conversation is a channel where a user has sent a message or a direct message (DM). You can use this API to populate a list of channels or DMs for a user to find their active chats.
To retrieve the conversation list, sign in to the application and then use vx_req_account_get_conversations to make a request. This request returns:
- The number of conversations.
- The next cursor if there is a next page.
- The list of conversations for this page.
After you retrieve the user’s conversation list, the game must process the vx_resp_account_get_conversations_t response:vx_req_account_get_conversations *req;vx_req_account_get_conversations_create(&req);req->cursor = ”1”; // Optional parameter if you’re fetching anything but the first pagereq->request_time = 1697135622123456; // Optional, unix time in microseconds, needs to be set to the same time to keep results consistent between pagesreq->page_size = 10; // Optional, otherwise server default is used. Default is 10vx_issue_request2(&req->base);
void HandleAccountGetConversationsResponse(vx_resp_account_get_conversations_t *resp){ // Handles the response, if a next-cursor exists in the response this can be used // to fetch the next page}