- [HTTP request](https://docs.cloud.google.com/memorystore/docs/cluster/reference/rest/v1alpha1/projects.locations.clusters/addTokenAuthUser#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/memorystore/docs/cluster/reference/rest/v1alpha1/projects.locations.clusters/addTokenAuthUser#body.PATH_PARAMETERS)
- [Request body](https://docs.cloud.google.com/memorystore/docs/cluster/reference/rest/v1alpha1/projects.locations.clusters/addTokenAuthUser#body.request_body)
  - [JSON representation](https://docs.cloud.google.com/memorystore/docs/cluster/reference/rest/v1alpha1/projects.locations.clusters/addTokenAuthUser#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://docs.cloud.google.com/memorystore/docs/cluster/reference/rest/v1alpha1/projects.locations.clusters/addTokenAuthUser#body.response_body)
- [Authorization scopes](https://docs.cloud.google.com/memorystore/docs/cluster/reference/rest/v1alpha1/projects.locations.clusters/addTokenAuthUser#body.aspect)
- [Examples](https://docs.cloud.google.com/memorystore/docs/cluster/reference/rest/v1alpha1/projects.locations.clusters/addTokenAuthUser#examples)
- [Try it!](https://docs.cloud.google.com/memorystore/docs/cluster/reference/rest/v1alpha1/projects.locations.clusters/addTokenAuthUser#try-it)

Adds a token auth user for a token based auth enabled cluster.

### HTTP request

`POST https://redis.googleapis.com/v1alpha1/{cluster=projects/*/locations/*/clusters/*}:addTokenAuthUser`

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

### Path parameters

| Parameters ||
|---|---|
| `cluster` | `string` Required. The cluster resource that this token auth user will be added for. Format: projects/{project}/locations/{location}/clusters/{cluster} |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "tokenAuthUser": string } ``` |

| Fields ||
|---|---|
| `tokenAuthUser` | `string` Required. The id of the token auth user to add. |

### Response body

If successful, the response body contains an instance of `https://docs.cloud.google.com/memorystore/docs/cluster/reference/rest/Shared.Types/ListOperationsResponse#Operation`.

### Authorization scopes

Requires one of the following OAuth scopes:

- `https://www.googleapis.com/auth/cloud-platform`
- `https://www.googleapis.com/auth/redis.read-write`

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