Twilio消息状态回调

时间:2019-04-26 02:46:09

标签: sms twilio

我正在用twilio可编程短信构建一个应用程序,当我收到消息状态回调时,我似乎接到了6个电话,其中3个通过了我的基本身份验证,并且我返回了204无内容,其他三个401验证失败。

这些是ngrok的日志。

POST /sms/callback/message-status 204
POST /sms/callback/message-status 401
POST /sms/callback/message-status 204
POST /sms/callback/message-status 204
POST /sms/callback/message-status 401
POST /sms/callback/message-status 401

除了成功的呼叫正在传递cookie外,所有呼叫看起来都一样(不确定为什么回调函数甚至会存储cookie)

好像他们对第一个呼叫的状态不满意,并且在没有身份验证或类似内容的情况下再次尝试。

成功

POST /sms/callback/message-status HTTP/1.1
Content-Type: application/x-www-form-urlencoded; charset=utf-8
X-Twilio-Signature: abcdefghigh=
Authorization: Basic abcdefg
Accept-Encoding: gzip,deflate
Accept: */*
Content-Length: 286
Host: 111111.ngrok.io
Cache-Control: max-age=259200
User-Agent: TwilioProxy/1.1
connection: close
X-Forwarded-Proto: https
X-Forwarded-For: 18.205.27.200


Unsuccessful

Successful

POST /sms/callback/message-status HTTP/1.1
Content-Type: application/x-www-form-urlencoded; charset=utf-8
X-Twilio-Signature: abcdefghigh=
Accept-Encoding: gzip,deflate
Accept: */*
Content-Length: 286
Host: 111111.ngrok.io
Cache-Control: max-age=259200
User-Agent: TwilioProxy/1.1
connection: close
X-Forwarded-Proto: https
X-Forwarded-For: 18.205.27.200

第二个呼叫缺少auth,问题是为什么

0 个答案:

没有答案