Twilio Forums

1 view
Skip to first unread message

Dion Worles

unread,
Aug 4, 2024, 2:56:23 PM8/4/24
to ponmalihang
Ihave tried changing "client.messages.create"to "client.sms.messages.create"But this has no effect (I also saw in previous posts that using Python 2.7 is good, and that I could update PythonAnywhere's version of Twilio - done that too.). The virtualenv in running in PythonAnywhere from the same folder as this code.

For anyone else who comes across this issue, here's an explanation of why it's necessary: free accounts on PythonAnywhere can only connect to external Internet sites like Twilio using a proxy. Paid accounts have direct Internet access. Normally this is all transparent to you as a developer; the libraries you use to connect to external sites look in the operating system's environment, notice that there's an http_proxy variable set there, and use it. So everything just works.


But some libraries aren't that smart, and need to be told about the proxy explicitly; the Twilio library is one of those libraries. So the code that @vikibrookes posted looks up the http_proxy variable in the OS environment, splits it into the two important parts -- the hostname for the proxy server, and the port the server is listening on -- and then tells the Twilio library to use it.


Thanks for the awesome start. I actually started on a free account and upgraded because I love the service, but I ran into a "service interruption" because my code was taking advantage of the proxy being present, but not handling when it wasn't. I updated the snippet to handle both cases which now means sharing code with "freeloaders" doesn't mean breaking them, and if I can convince them to upgrade they won't have to rewrite anything. :)


Hi,Back to the original topic, just wanted to check if you know if anything changed in approach to Twilio? As I checked now its API works on requests, so judging from previous posts this should help in proper running on Python 3.


They also made some changes to package, so I couldn't find Connection class with set proxy method anywhere.I tried to play around with TwilioHttpConnection but with no luck. I might be wrong but now it may be connected with allow_redirect param going into request attributes


Yeah, that's the way I did it, I've setup dedicated py3.5 venv and pip installed Twilio, then started to play around - but didn't work :/I guess if new Twilio uses requests rather that httplib2 now it should work with python 3 as well?


Interesting. The important part of that is the Failed to establish a new connection: [Errno 111] Connection refused, which normally means that the library you're using is ignoring the proxy settings. What's the hug module? It doesn't look like part of the Twilio API, at least as I remember it...?


As an exercise I tried copying Twilio package into my app directory and manually overwritten all methods in it to have their default attribute allow_redirect to True (it's False in original package) - no changes, still error 111


Do you have some sample code that I could run that triggers the problem? I wouldn't need your Twilio credentials (because the problem is happening before it's connected to their servers), but some code to play with and the output of pip show twilio would be useful.


I got exactly this same problem, after several hours of trying lot of solutions that didn't work. I just uninstalled the twilio 6.12.1 and installed 5.7.12 and all worked, don't forget to change from twilio.rest import Client to from twilio.rest import TwilioRestClient and change from client = Client(account_sid, auth_token) to client = TwilioRestClient(account_sid, auth_token)


Currently the SMS is only sent to whoever is configured to receive the notification. It won't send to the user who submitted the form. The Twilio Add-On is still really new so we are always open to ideas and suggestions for adding additional functionality to it in the future.


Excellent, so can the notification be sent via SMS and email simultaneously? Basically the scenario is I have 2 people (admins) needing to to receive the form notification, one via email or SMS and the other just by email. Is all this possible?


I had the same issue, wanted to send messages to the actual user that signed up, seems like a pretty simple feature to implement, don't really understand why it isn't. All i did was add one line of code to twilio.php and modify another line. around line 934 modify the lines to look like this:




I'm right in the same boat as Adrian. ALL I want is for the users to be able to input their phone number(s) on my website, and when I get enough phone numbers, I want to be able to send a mass text from my Twilio phone number. It's as simple as that. I just purchased the developers license today...


@oursmartweb What you describe is not what the Twilio Add-On is designed to do. It is strictly for sending an SMS notification to you or whoever you configure it to send to when a form is submitted. It is not designed to send mass text messages, that isn't what it does nor do we market it as having bulk text message functionality.


In the future please do not piggyback off another user's support request. The user that posted this request already had their issue resolved and therefore your reply has a good chance of not being noticed because of this which is exactly what happened. All support requests should be done by creating a new support forum post, not piggybacking on an existing post.


If you install with meteor add dispatch:twilio it may of not had the dependencies bundled, check the command line output when you start your app usually it will tell you something like module missing and the npm line to run, it may need the --save flag


The easiest solution is to use the twilio npm package and just follow the node examples in their documentation. Definitely do not use atmosphere packages for this. And using their API via REST is also possible, but as you are experiencing, a bit more complex than using their npm package.


I have go through Integromat. They are good but i really desire to work independently. Moving forward, what i expect from monday.com is, passing data(GET/POST method) from my website/server to monday.com.

Somethin like, from monday.com i get all changes using webhook. Which means that i can synchronize my database/system. Similarly I want to update monday.com dashboard by sending data from my system. Is there are any way exists right now? If not then i appreciate if monday.com create such system for us.


Can we do 2-way chat using monday.com through twilio api for sending sms and recevie sms ?

yes we can do receive sms using integromat(make) and put a webhook on twilio incoming message url area.

But i want to make sure about to do 2-way chat in monday.com


I have connected my dialogflow CX, with Twilio and using it to run it on WhatsApp. The integration is working fine, but my CX has rich content output displaying options to select, but when trying it on WhatsApp, it's not showing any options, just sending me text.


I already have fulfillment message as custom payload, and when I checked my integration logs on cloud run, the custom payload is not being set, only the normal text is being sent.



I'm unaware of creating channels as I'm pretty new to cx, can you provide me any resource to refer?


The rich content worked when I published agent and integrated code on the website. I have doubt that rich content response will not be sent to twilio as my cloud service logs have only text response, maybe this is where channel part you suggest helps. I will try, Thanks again for quick response.


I have created the workflow where I have used the UiPath.Twilio.acitivities package by UiPath and my workflow is running completely fine using 1.0.0 preview version but when I updated the package to latest version it is now working and giving the below error.


As a workaround you can get the package from a computer in which you have deployed your code before by searching it into C:/users/%username%/.nuget/packages and paste it into your new computer, and then you will be able to check your code and migrate it to another package.


Thanks for quick revert! So, I am using the 1.0.0 version of Uipath.Twilio.Activities package in one of my machine where my workflow is running completely fine.

On the other hand, in my another machine it is not working with the same package but if I use 1.0.0 preview package then only it is working.


One important question, like they are saying they dont support twilio activity anymore so we will be not able to use this package anymore in future? they will remove it? What does it exactly mean? as I have to set this up for client!


Reach RS2 features a power-efficient 3.5G HSPA modem with 2G fallback and global coverage. Now corrections can be accessed or broadcasted over NTRIP independently, without relying on an Internet connection on your phone.


It does work with a sim card from a carrier directly vs hologram or twilio. This sim is a regular sim in that you can do voice and data. The only difference is that twilio provides is the availability of two cellular providers vs just one. This gives us the ability to have the best cellular coverage depending on which of the two has a stronger signal at the given moment. Not having access to use a sim like this is a great disadvantage to the Emlid user.


The problem is when someone is in a meeting: The phone rings, the user declines the call quickly. Stupidly, Twilio retries immediately, and if the user declines again, twilio will try up to 7 (!) times immediately.


This problem happens when using Dial verb as well and it is very annoying that Twilio documentation doesn't mention this continuous retrying. There has to be a way to prevent retries as like you say it is a show stopper for a lot of situations.


currently we have purchased numbers on twilio, so it seems that it would be possible to drop costs immediately or close to it if we do SIP trunking and just keep a light skin of the twilio APIs in place for now.


hi @nirshani, We had implemented Twilio SMS at our end and during the process realized that we were unable to accomplish sending sms/whatsapp message directly using custom action as twilio uses basic authentication with content type as url encoded.

3a8082e126
Reply all
Reply to author
Forward
0 new messages