Sending alert messages to multiple whatsapp users using Twilio? - javascript

I need to send whatsapp messages to multiple phone numbers using node.js.I am using the twilio Api to achieve this.I signed up in twilio,followed the steps and used my mobile number for the sandbox.I used the code in node.js application,it worked with my whatsapp number,but not with other phone numbers.Is there anything to deal with a trail version?? Or Is their any other way to sort this out? please let me know.

Twilio developer evangelist here.
The WhatsApp Sandbox is intended for testing and you can only send messages to numbers that have sent you the phrase required to join your sandbox (the phrase is the word "join" plus two random words, like "join ceil-maltese").
Once you have tested and you want to take your application to production, you need to create a WhatsApp Business profile and connect a Twilio number that you own to it. Once you have gone through the process documented here you will be able to send WhatsApp messages to your users once they have opted-in to receive those notifications.

Related

is it possible to reduce the firebase phone authentication to a white list?

I want to use firebase phone authentication but I don't want to let any random phone number to login.
I know I can use "onCreate" trigger on the server and delete any new user after it is created .
https://firebase.google.com/docs/functions/auth-events
but this doesn't look like a clean solution.
In fact I don't even want to send the SMS code to a phone number that is not in my whitelist.
(People can make mistake and enter wrong phone number)
I don't want to have the whitelist on client side. it is neither secure nor private. It can be easily modified, plus all valid phone numbers can be read and harassed.
Is there a way to limit Firebase phone registration in a way that it only send the SMS if a phone number is part of a whitelist on server side.
Or is there any event on Firebase server side after phone number is entered and before SMS is sent that I can use to bypass sending SMS.
What you're describing is unfortunately not possible with Firebase Authentication's phone auth provider. If this is a hard requirement for your project, you may have to find another provider to fit this need.
For many auth providers what you're describing is possible in Google Cloud Identity Platform (Firebase Authentication's paid sibling) by implementing a blocking function, but I don't see phone auth listed in the supported providers.

We are using angular-agora-rtc web, how to check user is active in Agora server.?

We are using sample from https://github.com/AgoraIO-Community/Angular-Agora-RTC The channel name is hard coded in the sample. When 2 users need to connect for a call. Ideally both should be on same channel. Is there a way for user-1 to check whether user-2 is online using agora-web-sdk?. If the user is online, how can user-1 share a channel-id with user-2?
One-to-one video call implementation using agoara sdk. For 2 user to have a call, they should be in same channel. Link above has the sample I am trying. Not sure how two user share same channel name with each other being in 2 different mediums at real-time.
https://github.com/AgoraIO-Community/Angular-Agora-RTC
If agoara provides an API to check if user-2 or user-1 is online after these user's have created clients in web. Is there a way to exchange "channel id" between active users.
There is no such answer to this question anywhere on internet believe me i have searched for it, only thing that came to my mind is to use some type of User Base like Firebase, PHP MySQL etc to setup user and then login those users in your app.
After logging in, set various flags for user presence like is_online, last_active, is_broadcasting, is_audience etc to determine which user is online.
You can then put channel name along with other user details when the user login and starts the Broadcast.
After the user is broadcasting, use those flags you used before and query them to get the broadcasting users and show them where ever you want for other users to join their broadcast.
This as simple as it can be in terms of explaining a really frustrating problem but in the end its only you who would have to implement any type of logic you can come up with.

Any API or something which allows to post received whatsApp message in website

Is there any way I can post my received whatsApp messages to my website. Basically I am creating a buy and sell site which allows buyer and seller to post
ads from their whatsapp application too.
The process is a user will send us a message on our whatsapp number with all the details about it ads and we will directly post it on our website without requiring the user to log in our website and post their. Is there any way through which this process can be facilitated. Thanks
Nope, WhatsApp don't give out an API because all the messages are not centralised, instead being on individual devices.
Check here https://www.quora.com/WhatsApp-Why-doesnt-WhatsApp-have-an-API

RabbitMQ send messages to users on website

I am trying to use RabbitMQ to send messages to users on a website. While I know how to communicate between different scripts I can't find anything about how I can get a new user to recieve messages.
Let's take chapter 1 of the tutorial as example: https://www.rabbitmq.com/tutorials/tutorial-one-python.html
How would I be able to send "Hello World" to a user on my website and be displayed in the console? Would it even be possible using python?
Try using the RabbitMQ Web-STOMP plugin: https://www.rabbitmq.com/web-stomp.html
You wouldn't use RabbitMQ for that. It's for communication between different services in your back end, not for sending messages between arbitrary users on your front end.

Checking online users with Facebook Javascript SDK

I'm trying to build some kind of a social game in facebook, where I need that every user that has approved my APP is able to receive notifications from me.
When the user approves my App, I save his UID in the DB for future reference.
At some later time, I want to make it possible for other users find partners for a game - so I need a way to pick randomly some user from my DB and check if he's online. Then, send him a message and propose to play with the current player.
So 2 questions:
How can I check if some user is online, using Javascript SDK? It seems that in the new Graph API I can't get the users' online status.
How can I then send him a message and propose to play the game? When he approves to play - he is being forwarded to the game page.
Many thanks in advance,
Roman
To get the user status you can try FQL, check this answer: How to get list of online friends using FQL with facebook API?
About your second question, check this: how send message facebook friend through graph api using Accessstoken

Categories

Resources