Social accounts linking doesn't work either from API or via docs management APi

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_id of 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

Closing something as solved even though the original author didn’t mention their question was solved is not great way to run this forum and expect people will ask questions.

My original issue is still valid, and its an issue of documentation and library signatures.

@auth0/5.1.0 expects a UserIdentityProviderEnumand when selecting custom for a custom provider, the api responds with invalid provider.

Even the link you posted in the documentation of the API hints on the following example.

{“provider”: “ad”,“connection_id”: “string”,”user_id”: [“string”,0],“link_with”: “string”} which is clearly invalid based on your response and the json you posted.

So yeah, the docs and the signatures are misleading. If you were able to do it maybe you can update the documentation for your users to be able to also do it.