whatsapp integration
# 🤝help
r
Hello! I want to retrive the number of the user that sent a message . In the logs of BotPress, I see that the info I am looking for is available : "recipient_id" My objective is to create a 7 days free trail for my bot and then stop the access of the user. How can i acheive that and is it possible? Thank you!!! https://cdn.discordapp.com/attachments/1229210212980756561/1229210213119430666/image.webp?ex=662eda38&is=661c6538&hm=065af099d0b8ff99fd5cc1c1b9ce9c4ef3fd09bdb1ab45cc4c3fe43a8915783b&
f
Hey there👋 You can see how you can get the phone number here https://botpress.com/docs/cloud/channels/whatsapp/#tips I would recommend you to store it in a table, and then check if the phone number is already registered there, and if it is check if it got registered more than 7 days ago.
r
hi there!!Thanks i would definitely store it in a table and check but the documentation you have provided fetches the data from conversation i want it from webhook callback payload data which is in the botpress logs. Is it possible in botpress to fetch the phone number and timestamp. Thanks!!
f
Ah okay, I see. Maybe someone like @limited-pencil-78283 knows?
l
I tried not working, working on something will keep you posted
@rough-ocean-51370 did you try something like user.phoneNumber = event.tags.conversation['whatsapp:userPhone'] Where is this received on WhatsApp Webhook or Webhook from Botpress?
r
@limited-pencil-78283 yes i tried it didn't work. i want to fetch this from the metadata in the logs of botpress when a it receives request from whatsapp payload. Thanks again!! https://cdn.discordapp.com/attachments/1229210212980756561/1229675761409982464/image.png?ex=66308bcb&is=661e16cb&hm=e8f5256bcdf6ae81b6967b8864d94005de6f6f0ab69d0403b0d7725bf0b9fa54&
l
this is the exact thing, I was trying yesterday with raw input and retrieve from history, was successful, but have on control on what is retrieved
r
can you share the code if it is successful.I want to fetch the timestamp and recepient id from this payload data.
3 Views