Twilio-发送短信不会调用statusCallback URL

问题描述

Twilio免费帐户。 这是我发送消息的方式:

      const args = {
        from : TWILIO_PHONE_NUMBER,to   : '+15005550006',// magic test number
        body : "test",statusCallback: 'https://postb.in/1604476976671-5019259769469' //twilioCallback.getUrl()
      }
      message = await this.client.messages.create(args)

结果:postbin从未收到请求。我自己的twilio回调网址也没有。我是否需要订阅,创建消息传递服务,为发件人电话号码付款并在args中使用该消息传递服务ID?这使它起作用吗?

解决方法

魔术数字/测试凭据不会发送请求。使用您的生产帐户SID和Auth令牌以及真实的Twilio数字发送请求。

Why aren't my test credentials working?