none
Exchange Web email API RRS feed

  • Question

  • We have an Exchange 2016 and just need to integrate with SMS gateway as end user should got SMS (when he login to web email) after typing his AD user name and password to enter the code as second layer of authentication so I am looking forward to integrate the below API with exchange API so how to perform such stuff

    public MessageData SendSMSToList(string sender, string[] numbers, string text)

            {

           string username = "RiCH@example.com"; // User name

    string password = "PASSWORD"; // User password

    using (RiCHClientService.RiCHClientServiceClient proxy = new  RiCHClientService.RiCHClientServiceClient())

                {

                    var response = proxy.SendSmsToList(new SmsListRequest()

                    {

                        Credential = new Credential() {

                            UserName = username,

                            Password = Encoding.UTF8.GetBytes(password),

                            PasswordType = PasswordType.HashedMD5

                        },

                        ContextInformation = new ContextInformation() {

                            Language = CultureLanguage.English

                         },

                        SmsListRequestMessage = new SmsListRequestMessage()

                        {

                            Sender = sender,

                            Numbers = numbers,

                            Text = text

                        }

                    });

                    if (response == null)

                        ThrowApplicationError();

                    else if (response.HasError || response.SmsListResponseMessage == null)

                        ThrowApplicationError(response.Code, response.Description);

                    return response.SmsListResponseMessage.Sms;

                }

            }


    Edward

    Wednesday, December 4, 2019 6:14 AM