static void changeWebHookUrl() { // Initialize Send Bird with accessKey, channelId SendBird.init(accessKey, channelId, templateNameSpace); /*******IGNORE this part*******/ SendBird.DeleteWebHook("f62f1349a73d4dcc85c5f3534c836f74"); SendBird.CreateWebHook("https://bima.om/api/Notifications/ReceiveWhatsAppMsg"); SendBird.ListWebHooks(); }
static void testSendMessage() { // Initialize Send Bird with accessKey, channelId SendBird.init(accessKey, channelId, templateNameSpace); //string phonenumber = "+8618043352122"; //string conversationId = "57347aa945cd4d4680241d9c12dfa01a"; string phonenumber = "+8618943739660"; string conversationId = "f4a528b72cee4530aee4ed8cb7b8139d"; //var msgs = SendBird.ListMessages(conversationId); //Console.WriteLine(JsonConvert.SerializeObject(msgs)); //SendBird.ViewConversation(conversationId); //return; /*******Start SEND Template Message Here*******/ // Input Information for template messages string templateName = "auto_compelete_en"; string templateLanguage = "en"; List <string> templateParams = new List <string> { "Huhu", "https://messagebird.com" }; //This function should be called when start conversation with new customer. //var convStartResult = SendBird.StartMessage(phonenumber, templateName, templateLanguage, templateParams); //Console.WriteLine("ConversationId = " + convStartResult.ConversationId + " MessageId = " + convStartResult.MessageId); //return; /*******End SEND Template Message *******/ /*******Start SEND Normal Message Here*******/ //SendBird.SendMessage(conversationId, "Text", "Really?"); //SendBird.SendMessage(conversationId, "Image", "https://www.gstatic.com/webp/gallery/4.sm.jpg", "captionText"); //SendBird.SendMessage(conversationId, "File", "https://www.radiantmediaplayer.com/media/big-buck-bunny-360p.mp4", "captionText"); /*******Start SEND Normal Message Here*******/ SendBird.SendLocation(conversationId, (float)23.579419, (float)58.411768); }