# Link Account

You may encounter such a scenario: your user uses a mobile phone number to register an account, and then uses WeChat to register an account. Now I want to bind the WeChat account to the mobile phone account. Later, when the user logs in using WeChat, he will log in to the mobile phone account and return the information of the mobile phone account.

You can bind the user's social account to his main account (mobile phone, email account) by calling the following API:

POST
https://core.authing.cn/api/v2/users/link

Bind the social account to the main account

If you want to bind a social account to a main account, the end user must provide the credentials of the social account and the credentials of the main account, so as to prove that he is the owner of these two accounts, and then bind set.

Headers
Content-Type
REQUIRED
string

application/x-www-form-urlencoded

Form Data Parameters
primaryUserToken
REQUIRED
string

Main account Token

secondaryUserToken
REQUIRED
string

Social Account Token

200: OK
{
  "code": 200,
  "message": "įģ‘厚成功"
}

When the social account binding is completed, the data corresponding to the original social account will be deleted, and you cannot log in to the original social account again.