Google OAuth - Handle Callback
curl --request POST \
--url https://api.app.shinzo.ai/auth/oauth/google/callback \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"code": "<string>",
"state": "<string>",
"token": "<string>",
"user": {},
"isNewUser": true
}
'Authentication
Google OAuth - Handle Callback
Complete Google OAuth authentication with the authorization code.
POST
/
auth
/
oauth
/
google
/
callback
Google OAuth - Handle Callback
curl --request POST \
--url https://api.app.shinzo.ai/auth/oauth/google/callback \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"code": "<string>",
"state": "<string>",
"token": "<string>",
"user": {},
"isNewUser": true
}
'Authentication
No authentication required.Body Parameters
string
required
Authorization code from Google.
string
State parameter for CSRF protection.
Example Request
curl -X POST "https://api.app.shinzo.ai/auth/oauth/google/callback" \
-H "Content-Type: application/json" \
-d '{
"code": "4/0AX4XfWh...",
"state": "random-state-string"
}'
Response
{
"token": "eyJhbGciOiJIUzI1NiIs...",
"user": {
"uuid": "usr_abc123",
"email": "user@gmail.com"
},
"isNewUser": false
}
Response Fields
string
JWT token for authenticated requests.
object
User profile information.
boolean
Whether this is a new account created via OAuth.
Status Codes
| Code | Description |
|---|---|
200 | Authentication successful |
400 | Invalid request (missing code, invalid state) |
401 | OAuth authentication failed |
Notes
- OAuth users don’t need to verify their email separately
- If a user with the same email already exists (registered via email/password), the accounts are linked
- The
isNewUserfield indicates whether a new account was created or an existing one was used

