WhatsApp Business api cloud: How do I register a Customer's phonenumber via api? - api

Currently, I am using WhatsApp Business api cloud on one of my web project, I would like to register a customer's phone number but via api instead through meta, developer platform like following:
"Here is the image to register customer's number in the meta developer platform"
I want do this:
(managing the phone numbers)
but via api, and later of that send the verification code via api as well.
If someone can help me , telling me if that is possible and sharing documentation or the endpoint I would appreciate it very much, I've been looking at the documentation and postman's examples for 2 days without any success.
I'm sorry I didn't share the pictures directly, it is my first question on Stackoverflow
Thanks in advance,
Greetings!

I guess you are using WhatsApp provided a test phone number in From, you need to read this, https://developers.facebook.com/docs/whatsapp/cloud-api/get-started#sent-test-message
Enter the recipient phone number you would like to message in the To field. Ensure the number is correct, and that you want to add it to your list of 5 possible message recipients —as you add phone numbers, follow the prompts on the screen to verify you have access to them. Once this number has been added, it cannot be removed from your list.
Note: This limitation is only for WhatsApp-provided test phone numbers. Real phone numbers that you register do not have a limit on the number of recipients.
You don't need to register receivers' phone numbers if you are using your own real business phone number in the sender's phone number.

Related

Signing up users using phone number react-native-firebase

I am working on an application that will sign up users based on their phone numbers. Everywhere I have read, there are articles regarding signing in users using their phone number. While researching for this I landed on a stackoverflow article itself that mentioned that the signInWithPhoneNumber() article will work for sign up when queried for first time, and will be used for sign in once the user is created as in this article What will happen if I sign in user using phone number without user creation in firebase?.
Going by this article, I wrote the following code to achieve my purpose
import auth from "#react-native-firebase/auth";
console.log("going to sign up with", numberToSend);
// numberToSned is the input number to which the message has to be sent
const confirmation = await auth().signInWithPhoneNumber(numberToSend);
I also set up a dummy number to test the feature.
But whenever this request is made my application shuts down by itself
Also I do not get any error on the console regarding this
So I wanted to ask is their a way to sign up users using their phone number in firebase with react-native?
As the link you describe (but didn't share) says: Firebase makes no distinction between signing up with a phone number or signing in with a phone number. The code for both cases is exactly the same, as shown in the documentation on Firebase phone authentication.

How some whatsapp auto reply apps can use our own phone number to do auto reply? I want to build using PHP

I'm applying from Twilio to use their WhatsApp API service they are providing to build a WhatsApp auto-reply bot. But the problem here is that they want us to use the phone number they provide to us which we need to buy from them.
I tried using the URL 'https://api.whatsapp.com/send?phone=15551234567' but it just redirects to a page to send a message which I need to click 'Send' in order for it to submit our message. Besides that, we need to be able to trigger the application that a message is received from a recipient so we still need to access the API.
So how exactly is it I want to build a Whatsapp Auto Reply service to the public if Twilio provides it's own phone number only to reply. I want to reply using phone numbers that my clients register with me which is their own phone numbers.
As we know Whatsapp API is not open for public but how other Whatsapp Auto Reply apps are able to use our phone number to auto-reply to our recipients?
Would love some feedback or solutions from StackOverflow community. Thanks.
Twilio developer evangelist here.
Currently the Twilio documentation on using numbers on WhatsApp says:
Currently, we are unable to enable WhatsApp on non-Twilio numbers; support for this is coming soon and we will update these docs once available.
So this is just a current limitation and will be changed in the future.

Allow user to choose how they receive forgot password code

Tried searching for this in Amazon's docs but couldn't come up with anything.
Assuming that both email and phone number are checked in the verification section of the user pool. If the client app wants to allow the user to choose how they receive the code (assuming they've forgotten their password) - how do we get Cognito to handle that? Is there a way of getting the forgotPassword method to select a route (email or SMS)?
From some early testing, it seems like it always goes one route if both are available. I do see that Amazon themselves have made this available on their site though, so hoping that it should be possible?
For this example, we can assume that we've got a verified email address and phone number for that user.
I am on the Cognito team. Currently the behavior is that if both phone number and email are verified, the code goes to the phone, hence phone number is given preference and there is no way to select where the code actually goes. However, we have heard this request in the past and I will add a +1 to the feature request on your behalf.

SMS Retriever API - phone picker source

Does Google's SMS Retriever API get the list of phone numbers from the SIM lines on the user's device (which means that it's similar to TelephonyManager), or from the user's Google Play account?
I'm the product manager at Google for this API. Yes, as of the latest version of Play Services, the Phone Selector shows both the phone number for the device from the TelephonyManager (if it can be parsed as as a valid phone number) as well as recent phone numbers for the active Google Accounts on the device.
This is not directly addressed from the docs but if we infer from this statement in the Obtain the user's phone number:
Often, it is the best user experience to use the hint picker to prompt
the user to choose from the phone numbers stored on the device and
thereby avoid having to manually type a phone number
we can deduce that SMS Retriever API gets the contacts from your device.
Update
Please look at #Steven Soneff's answer
The numbers are retrieved from Smart Lock for Passwords on Android. They are retrieved if the user already stored it using Smart Lock else they will be empty. You may also ask the user to store the number for future use-cases using Smart Lock for Passwords.

How to obtain the phone number when reading facebook contacts

I thought it was impossible to read phone numbers of contacts using facebook APIs, but "Facebook for HTC Sense" android application is syncing all that information to my local agenda.
Somebody knows how are they implementing this feature?
Is it for people you already have in your contacts? It's possible they are just cross-referencing other pieces of information (like email) against your local contact info.
Because phone number isn't a field in the graph nor is it one in the corresponding FQL table.
The fql fields are "cell" and "other_phone" but they are not available unless your app is whitelisted like obviously their iphone/android apps are. You can request those fields but they will return back null values, confirming those are the fields (requesting fields that don't exist throws errors).