# Method: users.projects.locations.signSshPublicKey

- [HTTP request](https://docs.cloud.google.com/compute/docs/oslogin/rest/v1beta/users.projects.locations/signSshPublicKey#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/compute/docs/oslogin/rest/v1beta/users.projects.locations/signSshPublicKey#body.PATH_PARAMETERS)
- [Request body](https://docs.cloud.google.com/compute/docs/oslogin/rest/v1beta/users.projects.locations/signSshPublicKey#body.request_body)
  - [JSON representation](https://docs.cloud.google.com/compute/docs/oslogin/rest/v1beta/users.projects.locations/signSshPublicKey#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://docs.cloud.google.com/compute/docs/oslogin/rest/v1beta/users.projects.locations/signSshPublicKey#body.response_body)
- [Authorization scopes](https://docs.cloud.google.com/compute/docs/oslogin/rest/v1beta/users.projects.locations/signSshPublicKey#body.aspect)
- [Try it!](https://docs.cloud.google.com/compute/docs/oslogin/rest/v1beta/users.projects.locations/signSshPublicKey#try-it)

Signs an SSH public key for a user to authenticate to an instance.

### HTTP request

`POST https://oslogin.googleapis.com/v1beta/{parent=users/*/projects/*/locations/*}:signSshPublicKey`

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

### Path parameters

| Parameters ||
|---|---|
| `parent` | `string` Required. The parent project and region for the signing request. |

### Request body

The request body contains data with the following structure:

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

| Fields ||
|---|---|
| `sshPublicKey` | `string` Required. The SSH public key to sign. |

### Response body

If successful, the response body contains an instance of `https://docs.cloud.google.com/compute/docs/oslogin/rest/v1beta/SignSshPublicKeyResponse`.

### Authorization scopes

Requires one of the following OAuth scopes:

- `https://www.googleapis.com/auth/cloud-platform`
- `
  https://www.googleapis.com/auth/compute`

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