How to send firebase auth sms in php? [duplicate] - javascript

I will create python api using Django
now I trying to verify phone number using firebase authentication end send SMS to user but I don't know how I will do

The phone number authentication in Firebase is only available from it's client-side SDKs, so the code that runs directly in your iOS, Android or Web app. It is not possible to trigger sending of the SMS message from the server.
So you can either find another service to send SMS messages, or to put the call to send the SMS message into the client-side code and then trigger that after it calls your Django API.

Related

How do I send a push notification to my android app whenever a new data is pushed into my firebase realtime database in javascript?

I have both my web app and my android app included into my firebase project. Using the web app, the user can insert data into the realtime database. Using the android app, the user can view his record, which is read from the realtime database.
My javascript:
firebase.database().ref("db/0/").push(
{
"name":"XXXX",
"age":YY,
"address":"ABCDEF"
}
)
//I want to send a notification to the app, whenever a new data is pushed
I want to send a notification to the app, whenever a new data is pushed into the realtime database. How do I proceed?
Calls to the FCM REST API to send a message to a device require that you specify the FCM server* key in your code. As its name implies, this key should only be used in server-side code, or in an otherwise trusted environment.
The reason for this is that anyone who has the FCM server key can send whatever message they want to all of your users. By including this key in your Android or web app, a malicious user can find it and you're putting your users at risk.
See How to send one to one message using Firebase Messaging for a better solution, which also links to the Firebase documentation of using Cloud Functions to notify a usr when something relevant to them happens in the Realtime Database.

Send an SMS using user's phone number in Javascript

I found several questions and answers that use an API like Twilio or Amazon to send SMS messages, but what I wanna know is whether there is a way to use the user's phone number to send an SMS message using Javascript. I am working on a desktop app that uses ElectronJs and ReactJs. Thank you.

How to push notification by a device to another device in react native

Can anyone tell me how to push notification by a device to another device ? Maybe that’s good if it in One Signal , but no problem if also by firebase ?
For android
My approach is to use firebase.
Use need a server and a database.
You initialize firebase in your app.
When user open your application you get token from firebase and send it to your server and in your server you store token for each user.
And then when a user wants to send message to another user, it call an api from your server to send notification to specific user.
And in your server you have firebase token for each user and by using that you can send push notification to that user with apis that firebase prepared.

Send Notification To All Firebase Cloud Messaging Tokens (Web)

Angular web app (not a native app)
I have my logic working to generate and save FCM tokens.
And I can send a send a message to one token using curl in the terminal.
I have been reviewing MANY tutorials and all I have seen send messages to one token at a time.
Is it possible to send a message to all the tokens you have saved in your Firebase Realtime Database?
Do I need to use (or build) some other tool to do this?
Thre is no built-in mechanism in Firebase Cloud Messaging to send a message to "all tokens".
Instead you can call the FCM legacy API to send a message to a collection of up to 1000 tokens at a time. The key is to use the registration_ids parameter (instead of the to parameter for a single token), as AL explains here: FCM (Firebase Cloud Messaging) Send to multiple devices and here: FCM: Message to multiple registration ids limit?, and as shown in the documentation for the legacy API.

Send an email through Salesforce server from External Application

I have an angular application, and wants to send an email to Salesforce contacts from external application through salesforce server.
I did not find any api or javascript file which allows me to write the code to send an email through salesforce server from external application.
Thanks.
You can use sendEmail() to send one or more emails via Salesforce. It can be either a SingleEmailMessage or a MassEmailMessage.
MassEmailMessage is more useful if you are dealing with a collection of Contacts, Leads or Users. See What's the Advantage of using MassEmailMessage instead of multiple SingleEmailMessage?

Categories

Resources