MyChat Integration API: MCIAPI_CS_AddUserToCommonContacts

MyChat Integration API: MCIAPI_CS_AddUserToCommonContacts

A command for adding a user to a common contact list. After multiple adding or editing call MCIAPI_CS_CommonContactsRebuild to update cache for online users' contacts, or wait until the system does it automatically.

 

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"     : 27

}

 

Field

Type

Value

Cmd

integer

command name that was executed successfully; equal to 24 (HEX 0018).

 

Possible errors

MCIAPI_Error_WrongIntegrationKey

#5: MCIAPI_Error_WrongIntegrationKey

#19: MCIAPI_Error_UINNotFound

#28: MCIAPI_Error_CannotWorkWithRobot

#31: MCIAPI_Error_WrongDepartmentID

#34 MCIAPI_Error_CommonContactsIsEmpty

#35 MCIAPI_Error_UINIsAlreadyInCommonContactList

 

See also

MCIAPI_CS_CommonContactsRebuild

MCIAPI_CS_GetDepartmentIDByTextPath

MCIAPI_CS_MoveUserToDepartment