(Incoming) Get contact list

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

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

The workflow is similar to (Incoming) Get conversation list

WebSocket event

Event name: contacts@get

⚠️ 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: contacts@get/response

Response object

KeyTypeExtraDescription
custom_idstring
required
Unique identifier from your services (1-64 characters)
contactsContact[]
required
List of contact 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

My response will be:

{
  "custom_id": "1234",
  "contacts": [
    {
      "uid": "8756",
      "displayName": "Boss",
      "number": "555-4567"
    },
    {
      "uid": "9173",
      "displayName": "Keny",
      "number": "555-1037"
    },
    {
      "uid": "41398",
      "displayName": "Officier Wendy",
      "number": "555-1890"
    }
  ]
}

What's next?

Incoming events

Outgoing events

Powered by Doctave