Contacts
URL: /contacts.ashx
Parameter | Description |
---|---|
l | Login - login of SIP account |
p | Password - password of sip account |
cl | Contacts list - a list of contacts in JSON format. An example of what this format should look like is provided below. |
sm | Synchronization method - contact list synchronization method.
|
rp | Response method - the parameter determines the method in which the response should be received. Accepted parameters:
|
Code will be received in response. The list of possible codes is below.
Kod | Description |
---|---|
200 | OK |
400 | Incorrect parameters - one of the parameters has not been provided |
403 | Invalid HTTP method - only POST method accepted |
404 | Invalid JSON format |
405 | Server side error |
406 | The login and/or password are incorrect |
cURL Request Example
curl --location --globoff --request POST 'https://xxxxxxxxx/emcd/contacts.ashx?l=piotr&p=wmhwrs2jfo&cl=[{%22id%22%3A0%2C%22name%22%3A%22Piotr%20Tokarczyk%22%2C%22numbers%22%3A[{%22number%22%3A%224866666666%22%2C%22mark%22%3A0%2C%22os%22%3A%22and%22}]}%2C{%22id%22%3A1%2C%22name%22%3A%22Wieslaw%20Zgodny%22%2C%22numbers%22%3A[{%22number%22%3A%224855555555%22%2C%22mark%22%3A0%2C%22os%22%3A%22and%22}]}]&sm=update&rp=http' \ --header 'User-Agent: vippie;ios;1.2.3' \ --header 'Content-Type: text/plain' \ --header 'Authorization: Basic YW5kOmFuZDJhMzJkaW0=' \ --header 'X-VIPPIE-DEVICE-ID: ff66fc693846285d' \ --header 'X-VIPPIE-DEVICE-NAME: iPhone8,1' |
---|
Sample JSON data exchange format for the address book - update and full methods.
...
When sending a list of contacts larger than 300, the list should be divided into smaller packages (e.g. 300 100 items each) and sent one by one. After sending the first package, we receive a token, we send the token to check whether there is already a JSON list, if so, after receiving it, we send the next package. We repeat the procedure until the entire book has been sent. During this time, you should update the contact list in the UI and show the RCS users every time the JSON list arrives.
...
Parameter | Description |
---|---|
l | Login - login of the SIP account |
p | Password - password of the SIP account |
method | getBlock - downloads the list of blocked contacts and the list of users who blocked me |
cURL Request Example
curl --location --request POST 'https://xxxxxxxxx/emcd/contacts.ashx?l=piotr&p=wmhwrs2jfo&method=getBlock' \ --header 'User-Agent: vippie;ios;1.2.3' \ --header 'Content-Type: text/plain' \ --header 'Authorization: Basic YW5kOmFuZDJhMzJkaW0=' \ --header 'X-VIPPIE-DEVICE-ID: ff66fc693846285d' \ --header 'X-VIPPIE-DEVICE-NAME: iPhone8,1' |
---|
Return value
Code Block |
---|
{ "in": [ "login1", "login2", "login3" ], "out": [ "login4", "login5", "login6" ] } |
...