- [HTTP request](https://docs.cloud.google.com/generative-ai-app-builder/docs/reference/rest/v1alpha/projects.locations.collections.engines.assistants/issueBrowserContextKey#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/generative-ai-app-builder/docs/reference/rest/v1alpha/projects.locations.collections.engines.assistants/issueBrowserContextKey#body.PATH_PARAMETERS)
- [Request body](https://docs.cloud.google.com/generative-ai-app-builder/docs/reference/rest/v1alpha/projects.locations.collections.engines.assistants/issueBrowserContextKey#body.request_body)
- [Response body](https://docs.cloud.google.com/generative-ai-app-builder/docs/reference/rest/v1alpha/projects.locations.collections.engines.assistants/issueBrowserContextKey#body.response_body)
  - [JSON representation](https://docs.cloud.google.com/generative-ai-app-builder/docs/reference/rest/v1alpha/projects.locations.collections.engines.assistants/issueBrowserContextKey#body.IssueBrowserContextKeyResponse.SCHEMA_REPRESENTATION)
- [Authorization scopes](https://docs.cloud.google.com/generative-ai-app-builder/docs/reference/rest/v1alpha/projects.locations.collections.engines.assistants/issueBrowserContextKey#body.aspect)
- [IAM Permissions](https://docs.cloud.google.com/generative-ai-app-builder/docs/reference/rest/v1alpha/projects.locations.collections.engines.assistants/issueBrowserContextKey#body.aspect_1)

Issues an ephemeral browser context encryption key for encrypting tab context files prior to upload.

### HTTP request

Choose an endpoint:
global us   
`POST https://discoveryengine.googleapis.com/v1alpha/{name=projects/*/locations/*/collections/*/engines/*/assistants/*}:issueBrowserContextKey`

<br />

The URLs use [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Path parameters

| Parameters ||
|---|---|
| `name` | `string` Required. The resource name of the `https://docs.cloud.google.com/generative-ai-app-builder/docs/reference/rest/v1alpha/projects.locations.collections.engines.assistants#Assistant` serving the request. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}` |

### Request body

The request body must be empty.

### Response body

Response for `https://docs.cloud.google.com/generative-ai-app-builder/docs/reference/rest/v1alpha/projects.locations.collections.engines.assistants/issueBrowserContextKey#google.cloud.discoveryengine.v1alpha.AssistantService.IssueBrowserContextKey`.

If successful, the response body contains data with the following structure:

| JSON representation |
|---|
| ``` { "publicKeyset": string, "wrappedKeyset": string } ``` |

| Fields ||
|---|---|
| `publicKeyset` | `string (https://developers.google.com/discovery/v1/type-format format)` The serialized Tink HPKE public keyset (`google.crypto.tink.Keyset` with `ASYMMETRIC_PUBLIC` key material) for encrypting browser context files in the browser. A base64-encoded string. |
| `wrappedKeyset` | `string (https://developers.google.com/discovery/v1/type-format format)` The wrapped HPKE private keyset to pass back in `StreamAssistRequest.browser_context.encryption_metadata.wrapped_keyset`. A base64-encoded string. |

### Authorization scopes

Requires one of the following OAuth scopes:

- `https://www.googleapis.com/auth/cloud-platform`
- `https://www.googleapis.com/auth/discoveryengine.assist.readwrite`
- `https://www.googleapis.com/auth/discoveryengine.readwrite`
- `https://www.googleapis.com/auth/discoveryengine.serving.readwrite`

For more information, see the [Authentication Overview](https://docs.cloud.google.com/docs/authentication#authorization-gcp).

### IAM Permissions

Requires the following [IAM](https://cloud.google.com/iam/docs) permission on the `name` resource:

- `discoveryengine.assistants.assist`

For more information, see the [IAM documentation](https://cloud.google.com/iam/docs).