I want to implement the login with WeChat. While reading the documentation, I came across two different parameters whose meaning I don't fully understand: openId and unionId.
Could someone explain what these id's really are? As far as I understood it should be like this:
openId - some unique id of the user that could change from time to time
unionId - the unique id of the user, the only one that is always the same. Equivalent to the unique id the Google returns when logging in using Google API.
The documentation I read can be found here: http://open.wechat.com/cgi-bin/newreadtemplate?t=overseas_open/docs/web/login/getting-user-profile#login_getting-user-profile
From my understanding, a user's open ids vary from web apps to apps, whereas union id stays the same. For example, you have two apps that use wechat login: W1 and W2. A user will have openid1 for W1 and oepnid2 for W2 seperately, but you can use the user's union id the uniquely identify him/her across the apps.
Open id only changes when you have more than one web/mobile apps.
Hope it helps. Thanks.