You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 18, 2023. It is now read-only.
Замечание по реализации
Данный метод доступен как в синхронной, так и в асинхронной реализации.
Параметры запроса
Параметр
Описание
Тип данных параметра
Обязательный параметр
GroupId
Уникальный идентификатор группы
String
ParticipantPhone
Номер телефона добавляемого участника в группу
String
Указан только ParticipantPhone
Указан только ParticipantChatId
ParticipantChatId
Уникальный идентификатор добавляемого участника в группу
String
Указан только ParticipantChatId
Указан только ParticipantPhone
Параметры ответа
Параметр
Описание
Тип данных параметра
GroupId
Уникальный идентификатор группы
String
IsSuccess
Флаг успешности добавления участника в группу
Boolean
StatusMessage
Статус успешности добавления участника в группу
String
Пример использования
usingSystem;usingChatApi.Core.Connect;usingChatApi.Core.Connect.Interfaces;usingChatApi.Core.Response.Interfaces;usingChatApi.WA.Dialogs;usingChatApi.WA.Dialogs.Operations.Interfaces;usingChatApi.WA.Dialogs.Requests;usingChatApi.WA.Dialogs.Requests.Interfaces;usingChatApi.WA.Dialogs.Responses.Interfaces;usingChatApiClient.Properties;namespaceChatApiClient{internalclassProgram{internalstaticIWhatsAppConnectConnect{get;set;}internalstaticvoidMain(){// put your chat-api's dataConnect=newWhatsAppConnect(WhatsApp_Server,WhatsApp_Instance,WhatsApp_Token);IDialogOperationsoperation=newDialogOperations(Connect);IGroupOperationsgroupOperations=operation.GroupOperations.Value;IGroupParticipantOperationsparticipantOperations=groupOperations.GroupParticipantOperations.Value;IPromoteGroupParticipantRequestrequest=newPromoteGroupParticipantRequest{ParticipantPhone="+7(999) 111-11-11"// or ParticipantChatId = "79991111111@c.us"};varchatApiResponse=participantOperations.PromoteParticipant(request);if(!chatApiResponse.IsSuccess)throwchatApiResponse.Exception!;varresponse=chatApiResponse.GetResult();Console.WriteLine(response?.PrintMembers());}}}