Вы находитесь на странице: 1из 2

Response (when wrong or missing group_id parameter): Wrong or missing >>group_id<< parameter

Response (when wrong user_id parameter): Wrong >>user_id<< parameter


Response (when wrong public parameter): Wrong >>public<< parameter
Response (when result set is empty): No data to display

RESPONSE (XML):
Response:
<xml>
<contacts>
<contact>
<ID>17</ID>
<Name>mycontact1</Name>
<Number>23456</Number>
<id_user>1</id_user>
<is_public>true</is_public>
</contact>
<contact>
<ID>24</ID>
<Name>mycontact3</Name>
<Number>12345</Number>
<id_user>3</id_user>
<is_public>false</is_public>
</contact>
</contacts>
</xml>

Response (when wrong or missing group_id parameter):


<xml>
<error_text>Wrong or missing >>group_id<< parameter</error_text>
<status>error</status>
</xml>

Response (when wrong user_id parameter):


<xml>
<error_text>Wrong >>user_id<< parameter</error_text>
<status>error</status>
</xml>

Response (when wrong public parameter):


<xml>
<error_text> Wrong >>public<< parameter </error_text>
<status>error</status>
</xml>

64. Group members read: JSONRPC method

150 | SMSEagle NXS-9700 | User’s Manual


HTTP POST METHOD:
https://url-of-smseagle/jsonrpc/sms

Parameter Description

access_token authentication access token (see details in point API Authentication)

login your user to login to SMSEagle (see details in point API Authentication)

pass your password to login to SMSEagle

group_id ID of group to be queried

user_id (optional parameter) show only contacts created by user with given ID

public (optional parameter) 0 = private, 1 = public

responsetype (optional parameter) text = format response as text (default), xml = format
response as XML object

BODY:
{"method":"phonebook.group_members_read",
"params":{"access_token"="0005gOjCOlMH8F2BPo8mWqcGzycVHRLq","group_id":"11"
}}

RESPONSE:
Sample response:

{
"result": [
{"ID":"1706","Name":"mycontact1","Number":"23456",
"id_user":"1","is_public":"true"},
{"ID":"1693","Name":"mycontact3","Number":"12345",
"id_user":"3","is_public":"false"}
]
}

Response (when wrong or missing group_id parameter): {"result": "Wrong or missing


>>group_id<< parameter"}
Response (when wrong user_id parameter): {"result": "Wrong >>user_id<< parameter"}
Response (when wrong public parameter): {"result": "Wrong >>public<< parameter"}

RESPONSE (EXTENDED):
Sample response:
{
"result": {
"contacts": [
{"ID":"1706","Name":"mycontact1","Number":"23456",
"id_user":"1","is_public":"true"},
{"ID":"1693","Name": "mycontact3","Number":"12345",
"id_user":"3","is_public":"false"}
],
"status": "ok"
}
}

Response (when wrong logindata):

151 | SMSEagle NXS-9700 | User’s Manual

Вам также может понравиться