Google login
curl --request POST \
--url https://staging.api.prexsell.com/v2/auth/google/login \
--header 'Content-Type: application/json' \
--data '
{
"idToken": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...",
"companyId": "cmp_xyz789"
}
'{
"data": {
"user": {
"id": "usr_abc123def456",
"email": "user@example.com",
"firstName": "Іван",
"lastName": "Петренко"
},
"access": {
"contextType": "COMPANY",
"companyId": "cmp_xyz789",
"partnerId": null,
"role": "ADMIN",
"company": {
"id": "cmp_xyz789",
"name": "Prexsell Bus Lines",
"slug": "prexsell-bus-lines",
"tier": "PRO"
}
},
"session": {
"id": "ses_q1w2e3r4t5",
"contextType": "COMPANY",
"companyId": "cmp_xyz789",
"userId": "usr_abc123def456",
"expiresAt": "2026-06-28T00:00:00.000Z",
"lastUsedAt": "2026-05-28T12:00:00.000Z",
"revokedAt": null
},
"availableAccesses": []
}
}Auth
Google login
Authenticates the user using a Google ID token and creates a new session. Sets HTTP-only access and refresh token cookies on success.
POST
/
v2
/
auth
/
google
/
login
Google login
curl --request POST \
--url https://staging.api.prexsell.com/v2/auth/google/login \
--header 'Content-Type: application/json' \
--data '
{
"idToken": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...",
"companyId": "cmp_xyz789"
}
'{
"data": {
"user": {
"id": "usr_abc123def456",
"email": "user@example.com",
"firstName": "Іван",
"lastName": "Петренко"
},
"access": {
"contextType": "COMPANY",
"companyId": "cmp_xyz789",
"partnerId": null,
"role": "ADMIN",
"company": {
"id": "cmp_xyz789",
"name": "Prexsell Bus Lines",
"slug": "prexsell-bus-lines",
"tier": "PRO"
}
},
"session": {
"id": "ses_q1w2e3r4t5",
"contextType": "COMPANY",
"companyId": "cmp_xyz789",
"userId": "usr_abc123def456",
"expiresAt": "2026-06-28T00:00:00.000Z",
"lastUsedAt": "2026-05-28T12:00:00.000Z",
"revokedAt": null
},
"availableAccesses": []
}
}Body
application/json
Google ID token and optional company context for Google-based login.
Response
Successful Google login. Access and refresh tokens are set as HTTP-only cookies.
Full authentication payload returned after a successful login, token refresh, or session fetch.
Show child attributes
Show child attributes
⌘I
