Receiving notifications of new posts on Twitter via a specific URL - twitter

I would like to access the messages in the Twitter via the API in real time. A cursory search showed that it is possible to periodically send API-request to Twitter. In general, this is possible. 15 requests in 15 minutes is enough.
But I'm wondering, are there other ways to get information faster?
For example, is it possible to subscribe to notifications and receive a request from Twitter at a certain address?

Are you asking if Twitter has webhooks? The answer is yes
Review Securing Webhooks documention taking special note of the
Challenge Response Check (CRC) requirements.
Create a web app with an endpoint to use as your webhook to receive
events (e.g. https://example.com/webhook/twitter).
Make sure your webhook supports POST requests for incoming events and
GET requests for the CRC.
Register your webhook URL with your app using POST
account_activity/webhooks.
Use the returned webhook_id to add user subscriptions with POST
account_activity/webhooks/:webhook_id/subscriptions.

Related

how to get POST webhook with geo data from Whatsapp - while using studio flow

So i use studio flow for a whatsapp interaction. Sometimes our users lack internet, so we have an option to send locations in offline mode.
Once reconnected, we initiate a http_request in studio, that then uses the Twilio API to get all the inbound messages the user has been sending to whatsapp while offline. The http request only gets the last message send, so not the previous maybe 6 - 20 messages.
I can get the body text of all those, when i perform CLIENT.messages.stream. But not the geo information. As those are send in the Webhook POST request, that go to studio flow.
My question is thus how can i get the latitude/longitude? Is it possible at all?
Twilio does not store the geolocation data sent via WhatsApp. So you'll have to accept the geolocation data via the webhook HTTP request and store it somewhere else if you need to retrieve it later.

Verify SMS received in Twilio is from a real phone and not a spoofed POST request

I'm creating an app where a user can sign up for phone notifications. We're verifying users by sending them a text message and then having them respond "YES" or "NO" to receive text messages.
However, we're concerned that users might be able to spoof sending a message to our webhook by using a POST request to it with just enough data to verify them. Is there a way in Twilio to detect if an incoming request is from Twilio or not?
This is possible with more information here - X-Twilio-Signature. There are also a few different blog posts detailing its use, for example, How to secure Twilio webhook URLs in Node.js.

Triggering a Twilio function to write a record in an external service (e.g. a CRM) whenever an sms message is SENT via Twilio

What the title describes can already be done easily via programs like Zapier, so I am hopeful that it can be done through Twilio functions directly.
Essentially, I have my CRM set up so that based on certain triggers, it sends a http POST request to the Twilio URL that controls SMS sending:
https://api.twilio.com/2010-04-01/Accounts/ + twilioAccSId + /Messages.json
For the most part, this works great!
I just want a way for Twilio to then respond by using a function to write a record into the CRM (using the CRM's APIs).
I would want the record written to include things like the delivery status of the message e.g. whether it failed, or was successful). I'm also open to exploring other ways where Twilio can transmit this outbound message info to the CRM through other means, and then having a function on the CRM then write a record!
Do you have the code to share of what you are attempting and the issue encountered? Or is the question more if this is possible? It is certainly possible.
You will use a statusCallback URL of your outbound POST to the messages resource, which will fire with the statusCallback messages and make an API call to your CRM to update the customer record accordingly. You can append a URL query parameter to your statusCallback, so you know which customer record to update.
Track Delivery Status of Messages
How to Share Information Between Your Applications
Passing Custom Information via Requests to Twilio

How to receive contact name via Twilio WhatsApp

I am using the Twilio API for WhatsApp in a sandbox, for prototyping and testing. According to the Facebook / WhatsApp documentation, there are several types of inbound notifications that may be delivered to your unique Webhook.
Twilio API documentation is very limited and doesn’t mention any of the more advanced scenarios. For example retrieving the customers name, which should be present in every webhook request…
When I inspect the webhook, the body payload is very limited. Is there any way to receive the original channelData?
Apparently, this feature is not implemented yet. I received the following statement from Twilio.
Unfortunately we don't support the Contact name being included in the inbound Whatsapp message posted to your webhook at this time. I've raised a feature request for this with the Product Team in hopes that we'll have this feature available in the near future.
You can get the sender's name using the 'ProfileName' key from the request form.

Need an Api or webhook for youtube streaming notification

I need to find an Api/webhook, source code for youtube. Specifically, that Api/webhook will send me a notification only when a specific youtuber makes a direct live streaming transmission.
Thanks for your help.
You may refer with this link: Is there a way to get notifications from YouTube API when broadcaster is live. It stated that it requires a websocket connection with your API endpoint by using ws:// protocole at some point. Websocket listen to a server, and enable your browser to handle it's changes like events. So it's exacly what u need for notifications.
Also, you may use the GET https://www.googleapis.com/youtube/v3/liveBroadcasts endpoint which returns a list of YouTube broadcasts that match the API request parameters.
However, getting a notification will require some work. It will probably require polling the endpoint for changes to determine if a new broadcast has been started. I'm not aware of a PUSH API from YouTube to send a request to an endpoint of your choice to create a notification.
More info in the YouTube docs.

Resources