Skip to content

Finish attaching Google after the Stytch redirect, bound to the current session.

POST
/account/security/oauth/google/complete
curl --request POST \
--url https://api.siteqwality.com/account/security/oauth/google/complete \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "oauth_token": "example" }'

Requires X-Stytch-Session-Token so Stytch attaches the OAuth factor to this member rather than creating a parallel login. Google’s email must match the session email (case-insensitive) or the request is rejected.

Media type application/json

Complete an in-session OAuth provider attach.

object
oauth_token
required

Token from the Stytch redirect (?token= on the callback URL).

string
Example generated
{
"oauth_token": "example"
}

Google connected

Media type application/json
object
ok
required
boolean
Example generated
{
"ok": true
}

Missing session token or email mismatch

Missing or invalid authentication

Endpoint requires a user session

Internal server error

Stytch API call failed