TWilio-Forward incoming SMS to emails in Rails5 - ruby-on-rails-5

I wanna forward all incoming messsages from my virtual twilio number to email
I am trying to add a webhook from the phone number settings but I didn't find any option in the Messaging service dropdown.
And after adding this how to handle the controller code to forward sms to email.
I am using twilio-ruby gem and RAILS-5

Twilio developer evangelist here.
A Messaging Service is a:
higher-level “bundling” of messaging functionality around a common set of senders, features, and configuration. The same settings and feature configuration applies to all of the senders (long code numbers, short codes, toll-free numbers, etc.) in the Messaging Service’s pool.
So that is not the setting you are looking for in this case.
To edit the webhook URL, you need to look further down the page. You currently have an ngrok URL set as the webhook when this number receives an incoming message. This is what you should change if you want to update it.
As for receiving the messages in your Rails controller, I recommend reading this blog post on receiving and replying to SMS messages with Rails.

Related

Trigger smart speaker announcement via HTTP request

I have a smart speaker with buit-in Google Assistant which I want to automatically make announcements at specific times. The times are determined by a program I wrote running in the cloud which can send HTTP POST requests at those times (e.g. to trigger a Telegram bot or anything else with a usable API).
Is there a way to send POST requests directly to my smart speaker with a message to announce? Or would I need some intermediary app/service to integrate with Google Assistant?

WhatsApp messaging webhook does not work in production mode

I am trying to create a connection between our WhatsApp Business account and our website where we gather all messages sent to our business on different channels (through our own app, text, WhatsApp, ...).
I've followed this tutorial (https://developers.facebook.com/docs/whatsapp/cloud-api/get-started) and have everything set up: our WhatsApp Business is working correctly, I've added a Meta App and I've set up the webhooks with a connection to my node.js backend.
When I click Test next to the "Messaging" webhook, I receive the message on my node.js backend and website. So I know this side is working as it should.
I've then used the Graph API to subscribe my Meta app to the messages with the business id of the WhatsApp with the correct permissions. When checking the subscribed apps with the {business_id}/subscribed_apps endpoint, I can see my Meta app. So I believe everything is set up correctly.
My Meta app is also set to "production".
However, when I try to send a message with my personal WhatsApp to my business WhatsApp, I receive nothing on the webhook.
I checked the logs on my server and nothing is being received, so I know it's not an issue in my node.js backend.
Is there something else I need to do to make this work? Does the Meta app need to be verified to use the webhook in production? If so, how can I do this? The guide for verification says I need a platform and login insctructions, but the Meta app is really only a webhook without an interface.
Thanks in advance.

How could the app send a message to the phone when certain mission fulfilled?

I can use FCM console to send messages to all users or certain users at a certain time.
Now I want the app send a message to specified users when their in-game energy is full. How to realize it with FCM? And can I know the messages' sends, opens, conversions?
Sending a message to a user can only be done from a trusted environment, such as the Firebase console, or a place where you can trust that the code running is yours (such as your development machine, a server that you control, or something like Cloud Functions/Cloud Run).
For examples of how to send a message by calling FCM's API, see the documentation on building send requests, and this sample use-case of notifying the user when something interesting happens using Cloud Functions.

Send message from telegram via API

I am able to send messages from python to Telegram, but I cant seem to find the reverse.
I need to get the message from telegram channel and send it to a certain server using Api. Server can consume that Api and that's not my question. I need to know if Telegram can generate that post request.
Your bot should be a member or administrator of that channel. And then your bot will receive an update containing channel_post.
Note: You can't join your bot to channels or groups unless you're the owner or administrator of the channel. (Bots themselves do not have the ability to join, you add them manually)

Does GCM support notifications over SMS

I'm working on a project that respond to users by sending SMS for their request.
Right now I use telerivet for forwarding the SMS to my back end.
I want to know whether I can use GCM to send SMS notification.
Just to add to what #Nilesh already said, you can actually check if a certain app would provide SMS services. Simply look into the uses-permissions in its manifest.
As you can see in the required components of the GCM manifest, it does not require SEND_SMS or RECEIVE_SMS permissions, which you would have needed to support sending or receiving SMS, respectively.