# Method: accounts.register

- [HTTP request](https://docs.cloud.google.com/channel/docs/reference/rest/v1/accounts/register#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/channel/docs/reference/rest/v1/accounts/register#body.PATH_PARAMETERS)
- [Request body](https://docs.cloud.google.com/channel/docs/reference/rest/v1/accounts/register#body.request_body)
  - [JSON representation](https://docs.cloud.google.com/channel/docs/reference/rest/v1/accounts/register#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://docs.cloud.google.com/channel/docs/reference/rest/v1/accounts/register#body.response_body)
- [Authorization scopes](https://docs.cloud.google.com/channel/docs/reference/rest/v1/accounts/register#body.aspect)
- [Try it!](https://docs.cloud.google.com/channel/docs/reference/rest/v1/accounts/register#try-it)

Registers a service account with subscriber privileges on the Pub/Sub topic for this Channel Services account or integrator. After you create a subscriber, you get the events through `SubscriberEvent`

Possible error codes:

- PERMISSION_DENIED: The reseller account making the request and the provided reseller account are different, or the impersonated user is not a super admin.
- INVALID_ARGUMENT: Required request parameters are missing or invalid.
- INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
- UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.

Return value: The topic name with the registered service email address.

### HTTP request

`POST https://cloudchannel.googleapis.com/v1/{account=accounts/*}:register`

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

### Path parameters

| Parameters ||
|---|---|
| `account` | `string` Optional. Resource name of the account. Required if integrator is not provided. Otherwise, leave this field empty/unset. |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "serviceAccount": string, "integrator": string } ``` |

| Fields ||
|---|---|
| `serviceAccount` | `string` Required. Service account that provides subscriber access to the registered topic. |
| `integrator` | `string` Optional. Resource name of the integrator. Required if account is not provided. Otherwise, leave this field empty/unset. |

### Response body

If successful, the response body contains an instance of `https://docs.cloud.google.com/channel/docs/reference/rest/v1/RegisterSubscriberResponse`.

### Authorization scopes

Requires the following OAuth scope:

- `https://www.googleapis.com/auth/apps.order`

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