【问题标题】:How to make message from google script to WhatsApp group?如何从谷歌脚本向WhatsApp组发送消息?
【发布时间】:2020-05-01 11:09:04
【问题描述】:

因为我在WhatsApp 尝试了个人SMS 的以下代码。

function sendSms() {
  var app = SpreadsheetApp;
  var ss = app.getActiveSpreadsheet();
  var activeSheet = ss.getActiveSheet();

  var RecieverNumber = activeSheet.getRange("D2").getValue();
  var Message = activeSheet.getRange("E2").getValue();
  openWhatsApptab(RecieverNumber,Message);

}

function openWhatsApptab(RecieverNumber,Message){
  var url = "https://web.whatsapp.com/send?phone="+RecieverNumber+"&text="+Message;
  var scriptHtml = '<script>window.open("'+url+'");google.script.host.close();</script>';
  var ui = HtmlService.createHtmlOutput(scriptHtml);
  ui.setHeight(1);
  ui.setWidth(300);
  SpreadsheetApp.getUi().showModelessDialog(ui,"WhatsApp Redirection...");
}

但我想要 WhatsApp 组的这个。从谷歌脚本发送短信到我的 WhatsApp 组

【问题讨论】:

    标签: android api twilio whatsapp


    【解决方案1】:

    根据 Twillo 文档,whatsapp 已弃用组 API。

    WhatsApp 在 2020 年 4 月弃用了 Groups API。请参阅 Twilio Conversations 了解如何同时接触多个 WhatsApp 用户。

    来源:https://www.twilio.com/docs/whatsapp/best-practices-and-faqs

    【讨论】:

      猜你喜欢
      • 2023-03-07
      • 2021-12-31
      • 1970-01-01
      • 2019-11-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-04-01
      • 1970-01-01
      相关资源
      最近更新 更多