问题
I'm trying to use Twilio to create an automated test which includes a one-time-password (OTP) sent via SMS for my organization.
General Flow:
- User signs up, inputting phone number
- User receives OTP (from Nexmo's Verify) via SMS
- User inputs the OTP received
The idea for me to automate this is to have my test script inputting the Twilio phone number, calling the Twilio SMS API (doc: https://www.twilio.com/docs/sms/api/message-resource), extracting the OTP from the message and inputting it into the application.
The issue here is that no incoming messages are being shown on my Twilio console.
I have also configured the Twilio phone number to a TwiML Bin, whenever a message is received:
<?xml version="1.0" encoding="UTF-8"?>
<Response></Response>
I have tried this with both Malaysian +60
and Australian +61
Twilio phone numbers.
回答1:
Twilio developer evangelist here.
I'm not particularly familiar with Nexmo's Verify, but from a look at their product pages it suggests that verification messages will be sent from a short code. Twilio numbers cannot receive messages from short codes. This is likely why you can't see any inbound messages for your number.
来源:https://stackoverflow.com/questions/54123942/twilio-inbound-messages-showing-as-no-incoming-messages-even-though-sms-has-be