@coconutbaby you have 2 options through the API (https://api.manychat.com/swagger#/):
- findBySystemField: in which case you need to search for the PHONE NUMBER (not the WhatsApp Number - they’re 2 different fields)
- findByCustomField: in which case you search by a specific user field
Unfortunately, as of now there isn’t a way to search by WhatsApp ID (which is where the number is stored for WhatsApp subscribers).
My solution for this is to create a ‘mirror’ user field, and store the WhatsApp ID there.
Then, I have a rule setup on my bots that whenever a new WhatsApp subscriber is created, the rule triggers and sets the user field (let’s call it ‘whatsapp_id_user_field’) with the value of the WhatsApp ID.
With this, whenever I need to find a user ID to send a message, I can search using the findByCustomField endpoint (option 2).
Hope this makes sense!