Skip to main content
POST
/
v2
/
auth
/
google
/
pre-login
Google pre login
curl --request POST \
  --url https://staging.api.prexsell.com/v2/auth/google/pre-login \
  --header 'Content-Type: application/json' \
  --data '
{
  "idToken": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9..."
}
'
{
  "data": {
    "user": {
      "id": "usr_abc123def456",
      "email": "user@example.com",
      "firstName": "Іван",
      "lastName": "Петренко"
    },
    "availableAccesses": [
      {
        "contextType": "COMPANY",
        "companyId": "cmp_xyz789",
        "partnerId": null,
        "role": "ADMIN",
        "company": {
          "id": "cmp_xyz789",
          "name": "Prexsell Bus Lines",
          "slug": "prexsell-bus-lines",
          "tier": "PRO"
        }
      }
    ]
  }
}

Body

application/json

Google ID token for pre-login verification. Returns the list of company contexts the user can log into.

idToken
string
required

A Google ID token obtained from the Google Sign-In flow.

Example:

"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9..."

Response

Google token validated. Returns the user profile and the list of companies they can log into.

data
object
required