Unlink social provider REST API
DELETE
/api/user/security/social/{provider}
const url = 'http://127.0.0.1:25737/api/user/security/social/google';const options = { method: 'DELETE', headers: {cookie: 'hk_token=<hk_token>', 'Content-Type': 'application/json'}, body: '{"current_password":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url http://127.0.0.1:25737/api/user/security/social/google \ --header 'Content-Type: application/json' \ --cookie hk_token=<hk_token> \ --data '{ "current_password": "example" }'Unlinks a provider only when another social provider, passkey, or recently confirmed enabled password remains usable. TOTP, recovery codes, email MFA, and team SSO do not satisfy this guard.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”provider
required
string
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
current_password
string
Examplegenerated
{ "current_password": "example"}Responses
Section titled “Responses”Provider unlinked
Identity not linked
Media typeapplication/json
object
message
string
Examplegenerated
{ "message": "example"}No alternative primary login method
Media typeapplication/json
object
message
string
Examplegenerated
{ "message": "example"}