我无法从我的java代码中发送whatsup消息,然后显示下面的错误。
Exception in thread "main" com.twilio.exception.ApiException: Twilio could not find a Channel with the specified From address
at com.twilio.rest.api.v2010.account.MessageCreator.create(MessageCreator.java:530)
at com.twilio.rest.api.v2010.account.MessageCreator.create(MessageCreator.java:25)
at com.twilio.base.Creator.create(Creator.java:45)
at com.zinzzo.message.server.controller.MessageServiceController.sendwhatsupMessage(MessageServiceController.java:19)
at com.zinzzo.message.server.controller.MessageServiceController.main(MessageServiceController.java:31)这是我的代码
public void sendwhatsupMessage(){
Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
Message message = Message.creator(
new com.twilio.type.PhoneNumber("whatsapp:+919540215071"),
new com.twilio.type.PhoneNumber("whatsapp:+918882989093"),
"Your Yummy Cupcakes Company order of 1 dozen frosted cupcakes has shipped and should be delivered on July 10, 2019. Details: http://www.yummycupcakes.com/")
.create();
System.out.println(message.getSid());
System.out.println("messge sent");
}发布于 2020-11-27 01:29:15
您需要创建一个webook来接收入站消息。这个视频可以帮助你https://www.youtube.com/watch?v=EeUdel2AJ5g
https://stackoverflow.com/questions/65017202
复制相似问题