gpt4 book ai didi

android - 如何从谷歌脚本向 WhatsApp 组发送消息?

转载 作者:行者123 更新时间:2023-12-04 17:31:07 30 4
gpt4 key购买 nike

因为我在 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 组

最佳答案

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

WhatsApp deprecated the Groups API in April 2020. Please refer to Twilio Conversations to find out how to reach multiple WhatsApp users at the same time.

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

关于android - 如何从谷歌脚本向 WhatsApp 组发送消息?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59738615/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com