Skip to content

linkSocialAccount

POST
/api/auth/link-social
curl --request POST \
--url https://example.com/api/auth/link-social \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "callbackURL": "example", "provider": "apple", "idToken": { "token": "example", "nonce": "example", "accessToken": "example", "refreshToken": "example", "scopes": [ "example" ] }, "requestSignUp": true, "scopes": [ "example" ], "errorCallbackURL": "example", "disableRedirect": true, "additionalData": { "additionalProperty": "example" } }'

Link a social account to the user

Media typeapplication/json
object
callbackURL

The URL to redirect to after the user has signed in

string
provider
required
Any of:
string
Allowed values: apple atlassian cognito discord facebook figma github microsoft google huggingface slack spotify twitch twitter dropbox kick linear linkedin gitlab tiktok reddit roblox salesforce vk zoom notion kakao naver line paybin paypal polar railway vercel wechat
idToken
object
token
required
string
nonce
string
accessToken
string
refreshToken
string
scopes
Array<string>
requestSignUp
boolean
scopes

Additional scopes to request from the provider

Array<string>
errorCallbackURL

The URL to redirect to if there is an error during the link process

string
disableRedirect

Disable automatic redirection to the provider. Useful for handling the redirection yourself

boolean
additionalData
object
key
additional properties

Success

Media typeapplication/json
object
url

The authorization URL to redirect the user to

string
redirect
required

Indicates if the user should be redirected to the authorization URL

boolean
status
boolean
Examplegenerated
{
"url": "example",
"redirect": true,
"status": true
}

Bad Request. Usually due to missing parameters, or invalid parameters.

Media typeapplication/json
object
message
required
string
Examplegenerated
{
"message": "example"
}

Unauthorized. Due to missing or invalid authentication.

Media typeapplication/json
object
message
required
string
Examplegenerated
{
"message": "example"
}

Forbidden. You do not have permission to access this resource or to perform this action.

Media typeapplication/json
object
message
string
Examplegenerated
{
"message": "example"
}

Not Found. The requested resource was not found.

Media typeapplication/json
object
message
string
Examplegenerated
{
"message": "example"
}

Too Many Requests. You have exceeded the rate limit. Try again later.

Media typeapplication/json
object
message
string
Examplegenerated
{
"message": "example"
}

Internal Server Error. This is a problem with the server that you cannot fix.

Media typeapplication/json
object
message
string
Examplegenerated
{
"message": "example"
}