POST
/
users
/
{userID}
/
socialAccounts
Create a social login for a user
curl --request POST \
  --url https://backendapi.corbado.io/v2/users/{userID}/socialAccounts \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '{
  "providerType": "google",
  "identifierValue": "jane@doe.com",
  "foreignID": "53150919",
  "avatarURL": "https://avatars.githubusercontent.com/u/53150919?v=4",
  "fullName": "Jane Doe"
}'
{
  "socialAccountID": "soc-6060375336139150919",
  "providerType": "github",
  "identifierValue": "jane@doe.com",
  "userID": "usr-4693224802260150919",
  "foreignID": "53150919",
  "avatarURL": "https://avatars.githubusercontent.com/u/53150919?v=4",
  "fullName": "Jane Doe"
}

Authorizations

Authorization
string
header
required

Basic authentication is used to authenticate requests to the Backend API. The username is the project ID and the password is the API secret.

The project ID and API secret can be found in the Developer Panel.

Path Parameters

userID
string
required

Unique identifier of the user. Format: usr-<number>.

Example:

"usr-4693224802260150919"

Body

application/json

Response

200
application/json

Social login has been created.

The response is of type object.