Send whatsapp massage from Twilio using my number - python

I want to send an invitation for an event using Twilio API using my own number.
It will be very good if the "log" of the messages will be also saved in my phone.
Is it possible to do it with the API?
Sadly it seemed to be possible only after updating, so I've updated and paid the money and now I see that it's not that easy. The API is very confusing.
How can I do it?
When I write my number at the "From" I get:
twilio.base.exceptions.TwilioRestException: HTTP 400 error: Unable to create record: Twilio could not find a Channel with the specified From address
Is it possible to do it?
Thanks

If you are talking about sending a message from your own phone number (your cell phone), this can not be done with Twilio.
From the Twilio docs:
Note: You can not spoof messages from your own cell phone number. TheĀ FromĀ parameter can only display a Twilio number on your project, or an Alphanumeric Sender ID (where available).

Related

Automate WhatsApp to Send a Certain Message When a Received Message Includes a Certain Phrase

I am trying to see if it is possible to send a certain message to a group chat on WhatsApp when a message with a certain phrase is received. As an example assume I receive a message "Hello darling can you stop by at the grocery store? I love you". Since this message includes "I love you" I want to respond "Love you baby" automatically. Is this possible? If so how can I achieve my goal? My preferred language is Python.
Twilio has a good python api to do this (they only have a free trial but it's a clean way to do what you want to do).
In a web environment the code will run inside a server: the api will send it a webhook when a message is received; the program will filter out messages that do not need a reply; then it will send back a message to ones that need a reply.
Another way is to log into whatsapp web using selenium and then building all the logic upon it.

is there a way which can tell me if a message in whatsapp was tagged (or replying to)

CONTEXT:
Im trying to make a reminder system on whatsapp (TWILIO AUTOPILOT)
and to change state of task from incomplete to complete i thought it would be easy if user tags or replies to a particular reminder with done.
QUESTION:
If a user tags or replies to a message, is there a way i can retrieve information about that message, example the text in contained
IMAGE:
output needed in this case:
"Todays List: ... etc etc"
Twilio developer evangelist here.
I'm afraid that information is not currently available in the Twilio API for WhatsApp. You can see the extra parameters that you receive in the webhook for a WhatsApp message here, including parameters like ProfileName, WaId, Forwarded, FrequentlyForwarded and ButtonText, but nothing to do with replied to messages.

FailedRequest server error 520 when sending message using PyTextNow

Over the summer, I was successfully using the PyTextNow python library to send text messages from my raspberry pi to my phone with python. I stopped using it for a while, around a month. When I tried to use it again, my phone number on TextNow had expired and I was given new one. Since then, I have been unable to use my previous code even though I made all the needed adjustments for the new phone number. I get error that looks like this: FailedRequest: Could not send message. server return a Server error. Request Failed. Status Code: 520
Here is my code
import pytextnow as pytn
client = pytn.Client(#username#, #connect.sid#)
client.send_sms("phone #", "Hello")
I have verified that the username, connect.sid cookie, and phone number are all correct numerous times. I also set up a second TextNow account, modifying the code with the new username and connect.sid values, and got the same error. I know that I am connecting to the correct account because the client.get_unread_messages() function will pull up the correct messages. To my knowledge, it is only the send message function that is not working. Any help that would enable me to send sms messages again with PyTextNow, or a better way to send and read messages in python, would be appreciated. Thanks!

Python- How to check if a Twitch stream is online

I'm trying to check whether a twitch stream is online using python. This question has been asked here before however now I think the responses are out of date in relation to the twitch API.
For example https://api.twitch.tv/kraken/streams/syndicate just says that I did not specify a user ID.
{"error":"Bad Request","status":400,"message":"No client id specified"}
Thanks for any help!
As stated in the Twitch documentation, a client ID is required or a 400 is returned.
To get one go to here and register an application on the Twitch developer portal
After that, you can choose how you send the client-id, either through a request header called Client-ID or as a query parameter called client_id
For more information, you can find everything I've just summarised here

LinkedIn - cannot send messages

I am using Python API for sending messages in LinkedIn.
I found that
api.SendMessage("This is a test subject", "This is the test body", [pid])
can send messages only to the ones who are in our connected list and not others.
How do you send messages to anyone who is not in our connect list?
As I answered elsewhere, this is how LinkedIn behaves, whether you use the API or not. You can only message first degree connections.
There is an InMail feature that allows for messaging outside your first degree network, but that is a paid product. Is that something you're interested in?
Or the other option is to have a person between the sending and recipient agree to "pass the message along." That is not available via the API, however.
That's all I say here, as we're now outside the scope of technical questions.

Categories