I'm trying to understand how to use the Yowsup library for WhatsApp. I can send message and I can receive it, but I'm interested to get the phone number to start a new chat. In other words, will develop a computer app that can interact with WhatsApp users, for now I can do the following:
- I got the access to WhatsApp server by using this command:
python yowsup-cli -c config.example --requestcode sms
andpython yowsup-cli -c config.example --register xxx-xxx
- I send message by using this command:
python yowsup-cli -c config.example -s 39xxxxxxxxxx "!"
- I can have an interactive conversation by using this command:
python yowsup-cli -c config.example -i 39xxxxxxxxxx
- Get all message I received by using this command:
python yowsup-cli -c config.example -l
Now when an user send me a message how I can interact with him/her? I guess I should get the phone number form the command python yowsup-cli -c config.example -l
and begin a new interactive conversation with this command: python yowsup-cli -c config.example -i 39xxxxxxxxxx
in which the 39xxxxxxxxxx is the number of the user I get with the previous command.
I hope you can help me