twilio

converting Twilio sms body to a string - encoding error for @ symbol

折月煮酒 提交于 2019-12-12 19:57:36
问题 I'm sending an email address to my python webapp by sms using Twilio. However, when I attempt to convert the sms body containing the email address I get an exception. <type 'exceptions.UnicodeEncodeError'>, UnicodeEncodeError('ascii', u'myemail\xa1gmail.com', 13, 14, 'ordinal not in range(128)'), <traceback object at 0x10cca5f8>) Traceback (most recent call last): File "/base/python27_runtime/python27_lib/versions/third_party/webapp2-2.5.1/webapp2.py", line 570, in dispatch return method(

Twilio: Forward received SMS to URL

[亡魂溺海] 提交于 2019-12-12 18:56:49
问题 I want to send a SMS to my Twilio number and on receipt to forward it (POST/GET) to my URL. I would not like to be checking Twilio for new messages each minute as they are really few (20 SMS a day at max) and sent at random intervals so pooling seems like a waste of resources, also I need to take action inmediatly on message received so I would have to have an interval of max 1min if doing it this way. so if Twilio could "push" the SMS on receipt to some URL, it would be great. How could I

Conditional SMS response with Django/Twilio

ⅰ亾dé卋堺 提交于 2019-12-12 18:34:17
问题 I'm trying to adjust the SMS response depending on different parameters (caller id, body of text) and the error is "HTTP retrieval failure" I've tried using the Flask tutorial for different callers: def hello_monkey(): """Respond and greet the caller by name.""" from_number = request.values.get('From', None) if from_number in callers: message = callers[from_number] + ", thanks for the message!" else: message = "Monkey, thanks for the message!" But I realize Django might be different, so I've

How to send a message from MS Access using twilio?

萝らか妹 提交于 2019-12-12 18:26:33
问题 I have done a lot of research but I have found nothing. Has anyways already done this? Any examples? I want to send a message using a button in a form so it should call a vba code and use some information in the same form to send the message. Any ideas would be great!! I'm using Access 2010 回答1: Twilio evangelist here. The short answer is you need to POST to the Twilio REST API using VBA. Here is a bit of sample code that shows how to do this using XMLHTTP: Public Function GET_MESGS() Dim

twilio conversation tracking id

倾然丶 夕夏残阳落幕 提交于 2019-12-12 18:16:16
问题 I am creating a chat application with twilio but having an issue tracking conversations among multiple users and multiple conversations. Example: conversation -> userA & userB conversation2 -> userA & userB When userA sends a message to userB in conversation2 when I receive a SMS message from userA how do I map it to conversation2? What I am expecting: What I am looking for is an ID that is either provided by me or generated by twilio and given to me when I send the SMS. Then when I receive a

Twilio Ruby sending SMS - undefined method `messages'

拥有回忆 提交于 2019-12-12 18:11:21
问题 I am trying to send an SMS message from my Rails app via the Twilio API. I'm following the instructions here (https://github.com/twilio/twilio-ruby) but I can't seem to figure this one out. Here is the code in my rails controller require 'twilio-ruby' account_sid = '[I inserted account_sid here]' auth_token = '[I inserted auth_token here]' @client = Twilio::REST::Client.new(account_sid, auth_token) @client.account.messages.create( from: '+[number here]', to: '+[number here]', body: 'Hey there

Is it possible to change the Messaging URL callback with the Twilio API?

时光总嘲笑我的痴心妄想 提交于 2019-12-12 18:03:20
问题 Hello and thank you for reading. Is it possible to change the Messaging URL callback with the Twilio API? 回答1: You need to POST to an IncomingPhoneNumber instance resource. You can do it with curl , or if you're using another language read these docs, https://www.twilio.com/docs/api/rest/incoming-phone-numbers?code-sample=code-update-an-incomingphonenumber&code-language=curl&code-sdk-version=json (and select another language for the sample code). You will need to know: SUB-ACCOUNT-SID \\ the

Twilio - forward call after 2 rings

喜欢而已 提交于 2019-12-12 15:05:45
问题 Is it possible using Twilio to forward an incoming call to Phone Number A (Assume 416-555-1234), and if Phone Number A is busy or doesn't answer after 2 or 3 rings, forwards to Phone Number B? The XML looks like this right now: <xml version="1.0" encoding="UTF-8"?> <Response> <Dial> <Number>416-555-1234</Number> </Dial> </Response> 回答1: Here's one of the places the phone network gets a little odd. The ringing you hear is just a recording.. with no synchronization or relationship with anything

Error: Twilio could not find a Channel with the specified From address

吃可爱长大的小学妹 提交于 2019-12-12 14:03:51
问题 Im using twilio for whatsapp API, but the problem right now is that i keep getting this error Error: Twilio could not find a Channel with the specified From address Here's the code const express = require('express') const accountSid = '-' const authToken = '-' const client = require('twilio')(accountSid, authToken) const request = require('request') const app = express() app.get('/test', (req, res, next) => { client.messages .create({ body: 'Hello there!', from: 'whatsapp:+14155238886', to:

Twilio: programmatically join conference and play <Say> command or <Play> sound file?

大城市里の小女人 提交于 2019-12-12 13:53:17
问题 I have two users and I joined them both into a <Conference> . I would like to have a robot join the <Conference> and then make an announcement. There are two approaches I'm considering: Take everyone in the conference, redirect them to a TwiML that plays a sound, and then move them back into the Conference. Create a bot that somehow joins the Conference and plays TwiML, but it's not clear for me, from the documentation, how to do that. 回答1: Twilio developer evangelist here. Either of those