You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Question: What actual behavior did you experience?
Answer: When user had set the wx account (ex: test), it will return 'test'. But, I want the wx id ,not the wx account.
Case, wx_id is unique, wx account can be changed
The text was updated successfully, but these errors were encountered:
xmsz
changed the title
How to get the wx_id when use had wx account?
How to get the wx_id when user had wx account?
Nov 26, 2018
Yes, using Contact.id just can get contact unique id according to the puppet. It cannot get weixin id. See more: #1644#90#1276#133#1307
About wechaty API
If you want to get weixin id, you can use Contact.weixin(), but this isn't supported at this time, it is coming very soon! see [RFC] custom id on Contact #1647
If you want to get wx account(maybe you mean nickname), you can call Contact.name()
About Contact unique id
If you are using iPad version, Contact.id is unique ID of and always the same id across sessions. It means when you login again, you always get this unique id.
If you are using Web version, Contact.id is unique id but it will change across sessions. It means when you login again, you may get a different id even it is the same user.
1. Expected behavior
Question: What behavior do you expect?
Answer: Get wx_id from Contact.id not wx account
2. Actual behavior
Question: What actual behavior did you experience?
Answer: When user had set the wx account (ex: test), it will return 'test'. But, I want the wx id ,not the wx account.
Case, wx_id is unique, wx account can be changed
The text was updated successfully, but these errors were encountered: