You can register a user's phone number for SMS and WhatsApp directly from your website using the Web SDK's registerSmsNumber and registerWhatsappNumber API methods.
Here is an example of how to use these methods in your JavaScript code:
Pushwoosh.push((api) => {
// Register an SMS number
api.registerSmsNumber('+15551234567');
// Register a WhatsApp number
api.registerWhatsappNumber('whatsapp:+15551234568');
});
These methods associate the provided phone numbers with the current user's profile.
Comments
0 comments
Please sign in to leave a comment.