how to get mobile number using wechat api in android

Faiz Anwar picture Faiz Anwar · Nov 6, 2013 · Viewed 29.3k times · Source

how to get mobile number using wechat api in android. We can get mobile number and email-id by using Whatsapp api through this code

     AccountManager am = AccountManager.get(this);
     Account[] accounts = am.getAccounts();

So like that is it possible to get mobile number using wechat api ????

Answer

DeveloperX picture DeveloperX · Apr 10, 2014

You can not get the mobile number of the user. Not through an official account nor through the API as this is a security concern. Not even us at Wechat can get that number. It is kept back for security reasons and spam.

Recently it has become available to get a user's mobile number. This however is only available if the user clicks "allow" to your brand and only if you have integrated with their wallet.

You can however contact WeChat for a merchant account and once that is setup the Merchant API will be supplied to you.