---
title: "Start hosted Google guest sign-in"
description: "Starts Google sign-in using Kismet’s registered callback. Requires a server credential with guest_auth.write, an exact authorized HTTPS Origin and a same-origin BFF CSRF proof. The BFF supplies S256 PKCE and state; returnPath stays on that origin. No guest session or marketing consent is created. TEST requires a registered test identity unless an unexpired, manager-enabled real-Google staging participation policy covers this exact verified staging origin."
---

`POST /v1/developer/guest-auth/google/authorizations`

**Operation ID:** `startDeveloperGuestGoogleAuthorization`

Starts Google sign-in using Kismet’s registered callback. Requires a server credential with guest_auth.write, an exact authorized HTTPS Origin and a same-origin BFF CSRF proof. The BFF supplies S256 PKCE and state; returnPath stays on that origin. No guest session or marketing consent is created. TEST requires a registered test identity unless an unexpired, manager-enabled real-Google staging participation policy covers this exact verified staging origin.

## Contract status

| Field | Value |
| --- | --- |
| Maturity | `preview` |
| Required capability | `guest_auth.write` |
| Freshness class | `authenticated-state` |
| Quota cost | `1` |

All operations require a Kismet Developer Bearer credential. Collection and resource authority is resolved from the credential's installation grants; identifiers in the URL never grant access.

## Request parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `x-kismet-csrf` | header | string | yes |  |
| `origin` | header | string | yes |  |

## Request body

The request body is JSON. The canonical schema is:

```json
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "returnPath",
    "kidSid",
    "state",
    "codeChallenge"
  ],
  "properties": {
    "returnPath": {
      "type": "string",
      "maxLength": 2048
    },
    "kidSid": {
      "type": "string",
      "pattern": "^kid_[A-Za-z0-9]{8}$"
    },
    "state": {
      "type": "string",
      "pattern": "^[a-zA-Z0-9_-]{43}$"
    },
    "codeChallenge": {
      "type": "string",
      "pattern": "^[a-zA-Z0-9_-]{43}$"
    }
  }
}
```

Minimal example:

```json
{
  "returnPath": "string",
  "kidSid": "kid_Ab12Cd34",
  "state": "string",
  "codeChallenge": "string"
}
```

## cURL

Set `KISMET_API_ORIGIN=https://api.ksmt.app` and configure `KISMET_DEVELOPER_API_KEY` in your environment. Run server-credential requests from your backend, not browser code.

Guest access tokens come from the signed-in guest session held by your backend. Forward a CSRF proof only after your same-origin backend validates it. If shown, `KISMET_SITE_ORIGIN` is the authorized origin of your site. Do not substitute a guest ID or an invented token.

```sh
curl --request POST \
  "$KISMET_API_ORIGIN/v1/developer/guest-auth/google/authorizations" \
  --header "Authorization: Bearer $KISMET_DEVELOPER_API_KEY" \
  --header "Accept: application/json" \
  --header "x-kismet-csrf: $VALIDATED_CSRF_TOKEN" \
  --header "origin: $KISMET_SITE_ORIGIN" \
  --header "Content-Type: application/json" \
  --data '{"returnPath":"string","kidSid":"kid_Ab12Cd34","state":"string","codeChallenge":"string"}'
```

## Responses

| Status | Meaning |
| --- | --- |
| 201 | Created successfully. |
| 400 | Invalid request parameters or body. |
| 401 | Missing, invalid, expired, or inappropriate credential/session. |
| 403 | Credential lacks the required grant/capability, or an origin/CSRF check failed. |
| 409 | Request conflicts with the installation environment or current state. |
| 410 | The single-use authentication challenge is no longer valid. |
| 429 | Rate limit or quota exceeded; inspect response metadata before retrying. |
| 503 | A required Kismet dependency is temporarily unavailable. |

### 201 response example

```json
{
  "authorizationUrl": "https://accounts.google.com/o/oauth2/v2/auth?client_id=example&response_type=code",
  "expiresAt": "2026-09-27T18:10:00.000Z"
}
```

### 201 response schema

Content type: `application/json`. Required fields, nullable values, and nested structures are defined below.

<details>
<summary>View complete response schema</summary>

```json
{
  "type": "object",
  "required": [
    "authorizationUrl",
    "expiresAt"
  ],
  "properties": {
    "authorizationUrl": {
      "type": "string",
      "format": "uri"
    },
    "expiresAt": {
      "type": "string",
      "format": "date-time"
    }
  }
}
```

</details>

## Machine-readable sources

- [This page as Markdown](/api/reference/start-developer-guest-google-authorization.md)
- [Developer API OpenAPI v0.7.25](/openapi.json)
