linkSocialAccount
const url = 'https://example.com/api/auth/link-social';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"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"}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
The URL to redirect to after the user has signed in
object
Additional scopes to request from the provider
The URL to redirect to if there is an error during the link process
Disable automatic redirection to the provider. Useful for handling the redirection yourself
object
Responses
Section titled “Responses”Success
object
The authorization URL to redirect the user to
Indicates if the user should be redirected to the authorization URL
Examplegenerated
{ "url": "example", "redirect": true, "status": true}Bad Request. Usually due to missing parameters, or invalid parameters.
object
Examplegenerated
{ "message": "example"}Unauthorized. Due to missing or invalid authentication.
object
Examplegenerated
{ "message": "example"}Forbidden. You do not have permission to access this resource or to perform this action.
object
Examplegenerated
{ "message": "example"}Not Found. The requested resource was not found.
object
Examplegenerated
{ "message": "example"}Too Many Requests. You have exceeded the rate limit. Try again later.
object
Examplegenerated
{ "message": "example"}Internal Server Error. This is a problem with the server that you cannot fix.
object
Examplegenerated
{ "message": "example"}