# gcp_auth

> **Function** in `langsmith`

📖 [View in docs](https://reference.langchain.com/python/langsmith/sandbox/_proxy_config/gcp_auth)

Build a sandbox proxy rule that injects GCP OAuth bearer auth.

The sandbox proxy keeps the service account JSON outside the sandbox and
injects OAuth bearer tokens for built-in Google API host matching.
``service_account_json`` must be supplied as a ``workspace_secret`` or
``opaque`` value; plaintext service account JSON is intentionally not
supported.

## Signature

```python
gcp_auth(
    *,
    service_account_json: SandboxProxySecret,
    scopes: Sequence[str] | None = None,
    name: str = 'gcp',
    enabled: bool = True,
) -> SandboxProxyRule
```

---

[View source on GitHub](https://github.com/langchain-ai/langsmith-sdk/blob/d6cd6082f09e7826a2d6afe444ae6119e61b82a6/python/langsmith/sandbox/_proxy_config.py#L135)