Social accounts cannot be linked via the API Explorer you are offering. There example body is invalid, the documentation is misleading and it shouldn’t be that way. Errors codes are invalid.
I am sending a request with a valid provider value and a valid connection_id (even though its optional) and it still fails.
The response i get from the API explorer is
{
“statusCode”: 400,
“error”: “Bad Request”,
“message”: “The provider/connection is not configured.”,
“errorCode”: “inexistent_connection”
}
which is wrong, as the connection exists.
Hello @vchr,
Welcome to the Auth0 Community!
I have just tested this on my end, and the Link a User Account endpoint from the Management API works as intended, as I was able to link user accounts, with both database connections or social connections, while using the API Explorer token.
After setting the API Explorer in the Set Api Token field, you only need to make sure that you pass these parameters correctly in the body of the request:
- provider: This is the provider type of the secondary account you want to link. For example,
auth0(for a database connection),google-oauth2(for Google),facebook, etc. - user_id: This is the full, unique
user_idof the secondary user account (e.g.,google-oauth2|123456789..., auth0|12345abcd...).
Such as:
{
"provider": "SECONDARY_ACCOUNT_PROVIDER",
"user_id": "SECONDARY_ACCOUNT_USER_ID"
}
You may also need to include the connection_id if the secondary account is from an auth0 database connection and you have multiple database connections.
Thank you,
Remus