(Incoming) Get conversation list

This event is sent to your server when iPear needs the list of conversations for a profile.

Usually, our services ask for the conversation list at the first login. In order to avoid overloading your server with requests, we cache the data sent.

# Important note

This event can be optional (activated by default). if you have trouble retrieving the data to build the response, you can disable the retrieval of the conversation list by editing your server settings at https://me.ipear.fr

WebSocket event

Event name: messages@get#list

⚠️ Response required / expires after 60 seconds

Event data received

KeyTypeDescription
custom_idstringUnique identifier from your services (1-64 characters)

Expected WebSocket response

You need to emit an event with the following name and data:

Response event name: messages@get#list/response

Response object

KeyTypeExtraDescription
custom_idstring
required
Unique identifier from your services (1-64 characters)
listConversation[]
required
List of conversation object (0-100 length)

Important

Response object must respect every type rule. If any structure isn't respected, your request will be rejected for "bad-request".

Response example

I received a request for the following custom_id = 1234. After asking my database, the phone_number linked to this custom_id is: phone_number = "555-9876"

My response will be:

{
  "custom_id": "1234",
  "list": [
    {
      "number": "555-4567",
      "timestamp": 1674598102000,
      "last_message_content": "Understood. Let's meet at LSPD Station in my office.",
      "self": false
    },
    {
      "number": "555-6671",
      "timestamp": 1662484874000,
      "last_message_content": "Oops, yeah! How did you get my phone number?",
      "self": false
    },
    {
      "number": "555-9876",
      "timestamp": 1659180621000,
      "last_message_content": "Copy. On my way.",
      "self": true
    },
    {
      "number": "555-9876",
      "timestamp": 1642472160000,
      "last_message_content": "Hi! How are you?",
      "self": true
    }
  ]
}

What's next?

Incoming events

Powered by Doctave