---
title: "Create a social login for a user"
method: POST
path: "/users/{userID}/socialAccounts"
tags: ["Users"]
---

# Create a social login for a user

`POST /users/{userID}/socialAccounts`

Creates a new social login for a user by given `userID`. Social logins are used to authenticate users with third-party providers like Google, Microsoft, or GitHub.

You can set up social logins in the [Developer Panel](https://app.corbado.com/settings/userinterface?tab=Social) or consult the [Documentation](/corbado-complete/overview/configuration/social-logins/overview) for more details.

## Path parameters

- `userID` string, required

## Request body

- SocialAccountCreateReq
  - `providerType` 'google' | 'microsoft' | 'github', required — Type of the social provider.
  - `identifierValue` string, required — Login identifier of the user (here email address).
  - `foreignID` string, required — Unique identifier of the user in the social provider.
  - `avatarURL` string, required — URL of the avatar of the user in the social provider.
  - `fullName` string, required — Full name of the user in the social provider.

## Response `200`

Social login has been created.

- SocialAccount
  - `socialAccountID` string, required — Unique identifier of the social account.
  - `providerType` string, required — Type of the social provider.
  - `identifierValue` string, required — Login identifier of the user (here email address).
  - `userID` string, required — Unique identifier of the user.
  - `foreignID` string, required — Unique identifier of the user in the social provider.
  - `avatarURL` string, required — URL of the avatar of the user in the social provider.
  - `fullName` string, required — Full name of the user in the social provider.

## Other responses

- `default` — Error

---

[API](https://skmtc.net/corbado/apis/corbado-backend-api.md) · [All operations](https://skmtc.net/corbado/apis/corbado-backend-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/corbado/corbado-backend-api/versions/1f6143efe426/schema)
