User detail for Whatsapp

I just wanted to know the way to extract the name and number of the user on Whatsapp in the cloud function?

Have you tried using app.profile. Not sure about cloud but any user details who is interacting with WA bot can be extracted from there.

1 Like

We have tried app.profile, but it doesn’t seem to work on WA. Can you please guide us with some other way?

Sorry to hear that, in that case, can you elaborate on the following.

  1. use case
  2. please share the code for better understanding of ours.
  3. what response did you receive in app.profile and how the response is different/in sufficient for your case .
    (Please note that , for app.profile will return name of WA user ONLY if the bot has been deployed on a WA number/orchestrator. To get the number(in case of WA only), you may use app.sender.)
1 Like

We are very specific to WhatsApp only now. In app.profile we were only receiving 3 keys: name, firstTimeUser and device token .We wanted to fetch the number of user too. Let me try app.sender on production and will let you know if I need any help!!

Thanks!

If that’s the case, the app.sender should work for you as it will return the user WA number along with the ISD code. Let me know in case it doesn’t work