MyChat Integration API: MCIAPI_CS_AddUserToCommonContacts
A command for adding a user to a common contact list.
Syntax
{
"cmd" : "001B",
"ServerKey" : "iddqd",
"APIStype" : "mydata",
"UIN" : 17,
"GroupID" : 24
}
Parameters
Parameter |
Type |
Value |
ServerKey |
string |
IntegrationAPI key; you can set it in the server settings; |
APIStype |
string |
integration type. You can set any string. |
UIN |
integer |
user's ID, >0; |
GroupID |
integer |
department ID in the common contact list. |
Work result
{
"cmd" : "001B",
"UIN" : 17,
"GroupID" : 24
}
Field |
Type |
Value |
Cmd |
integer |
command name that was executed successfully; equal to 24 (HEX 0018). |
UIN |
integer |
ID of a user who was added to a common contact list; |
GroupID |
integer |
department ID in the common contact list. |
Possible errors
#5: MCIAPI_Error_WrongIntegrationKey
#28: MCIAPI_Error_CannotWorkWithRobot
#31: MCIAPI_Error_WrongDepartmentID
#34 MCIAPI_Error_CommonContactsIsEmpty
#35 MCIAPI_Error_UINIsAlreadyInCommonContactList
See also
MCIAPI_CS_CommonContactsRebuild