I'm using python to create sms service using twilio . I've done with sms sending part but not able to receive reply back (inbound sms). How to fix this?
Using twilio api , but not able to see inbound sms in logs
Related
I have a Twilio integration setup with an application I am building. The application allows users to send and receive text messages to/from a Twilio phone number.
For example, assume you're a user. When you create an account, you receive a phone number -- this phone number is purchased and managed via Twilio. You can then use this phone number to send and receive regular text messages.
To send, it's easy, just make the Twilio API call.
To receive, I'm using the webhook integrations. Meaning, I have a hosted server at https://my-website.com/api/sms/receive. Any time some external person sends a text message to the Twilio phone number, Twilio will send a HTTP POST request to my server.
The problem: Twilio is auto-responding, immediately, to the external persons phone number with OK. I cannot find any documentation about how to prevent this from happening.
I'll provide a real-world use case as an example.
Say Bob is a user of my application. Bob have a Twilio phone number through my app. Bob wants to send a text message to Alice. Alice is not a user of the app -- they're just some external person. Bob is using the app to communication with Alice via Alice's normal phone number.
Bob sends a text to Alice via the Twilio integration
Alice receives the text message on their phone
Alice responds back to Bob's text
Twilio triggers my server webhook integration
Twilio immediately auto-responds back to Alice with OK
(5.) is the problem -- I don't want this to happen
I found the solution. Turns out the webhook API needs to use the TwiML (Twilio Markdown Language) to instruct Twilio not to respond. https://support.twilio.com/hc/en-us/articles/223134127-Receive-SMS-and-MMS-Messages-without-Responding
Specifically, my server just returns a Content-Type of text/html and the body is simply <Response></Response>
How can one create a bot in Flow.xo that listens to twilio messages? In other words can I write a bot in FlowXO to send and receive SMS messages from my twilio account?
Flow.XO allows one to send SMS messages via their twilio integration function, but it only has two functions:
1> Twilio calls
2> Twilio SMS messages
Both these are outward bound, and we can only send messages (calls, or SMS) via twilio from Flow.xo. Can I receive messages in FlowspellingXO from Twilio too? How is this accomplished?
Thanks in anticipation.
Twilio developer evangelist here.
I haven't used Flow.XO before, but a quick look through the documentation suggests that this is the guide for you: https://support.flowxo.com/article/152-creating-a-twilio-sms-bot
Going through that process will create a URL that you will apply to your Twilio number or messaging service. That URL is the webhook URL that Twilio will use to send details about incoming messages so that your bot can respond to replies from your user.
Let me know if that helps!
I am trying to send sms for twilio trial account in java and i am not able to send the sms to my twilio account eventhough i have succeed in sending the sms from twillo account.Thanks for the help .
Scenario
I have an app that hooked to a twilio phone number through twilio credentials.
Is there a way to only log the SMS messages that my app is sending to twilio without twilio sending it to any outside number?
You can use Twilio test credentials. Then it won't send out the actual sms.
https://www.twilio.com/docs/api/rest/test-credentials
I connected Twilio connector to my registered Bot.
Whenever I send a sms to my Twilio number, I can see in the logs that Twilio service gets 404 when trying to post a message to
https://sms.botframework.com/api/sms
The bot itself works well. I can test it with the webchat iframe or through the test console. But it seems that the Twilio integration to the bot framework is broken
Twilio developer evangelist here. I've just been through the process and was able to get my messages sent to & from my bot.
The fact that your unable to do that suggests you missed a step in the configuration, so I will try and describe what I did here to see if it helps you out.
Created a TwiML application here and set its messaging url to https://sms.botframework.com/api/sms
Purchased a phone number and changed the messaging section to use my TwiML app.
Added my twilio credentials and twilio phone number to the SMS config section as follows:
One thing I noticed is that when Twilio makes a request to this URL to send an SMS, the url returns a 502.
But according to a Microsoft employee this is "harmless".
Let me know if this helps you at all, or if you still need any help.