# IRPCWebCompanionOperation.RegisterWebCompanion

Location: [gRPC API](https://developer.m-files.com/APIs/gRPC-API/index.md) > [Server integration API](https://developer.m-files.com/APIs/gRPC-API/integration/index.md) > [Web companion](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCWebCompanionOperation/index.md)

HTML version: https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCWebCompanionOperation/RegisterWebCompanion/

Badges: `Server integration API / specialized` `internal: not for applications` `write` `session`

Registers an M-Files Web Companion installation with the vault for the calling user.

- **Service:** [Web companion](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCWebCompanionOperation/index.md) `MFiles.IRPCWebCompanionOperation`
- **gRPC method:** `/MFiles.IRPCWebCompanionOperation/RegisterWebCompanion`
- **HTTP (mf-http-grpc):** `POST /grpc/v1/register-web-companion`
- **Request:** [`RegisterWebCompanionRequest`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCWebCompanionOperation/RegisterWebCompanion/index.md#request)
- **Response:** [`RegisterWebCompanionResponse`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCWebCompanionOperation/RegisterWebCompanion/index.md#response)
- **Book and level:** Server integration API, specialized
- **Kind:** write
- **Session:** Required: the session ID from LogIn in the mfiles-session-id-bin metadata.
- **Idempotent:** no
- **Returns metadata structure version:** no
- **Streaming:** none (unary)

<a id="remarks"></a>

## Remarks

**For M-Files components only.** M-Files Web calls it when it pairs with M-Files Web Companion.
Applications should not call it.

<a id="request"></a>

## Request: RegisterWebCompanionRequest

> Nested message fields are expanded to depth 3; follow a type link for deeper levels and for the type's own page.

| Field | Type | Description |
|---|---|---|
| `app_id` | `string` | The app ID of the Web Companion installation, at most 125 characters. |

<a id="response"></a>

## Response: RegisterWebCompanionResponse

> Nested message fields are expanded to depth 3; follow a type link for deeper levels and for the type's own page.

| Field | Type | Description |
|---|---|---|
| `secret_key` | `string` | For M-Files Web Companion. |
