# IRPCWebCompanionTaskOperation.GetWebCompanionTask

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 tasks](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCWebCompanionTaskOperation/index.md)

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

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

Gets a task that M-Files Web stored for M-Files Web Companion.

- **Service:** [Web companion tasks](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCWebCompanionTaskOperation/index.md) `MFiles.IRPCWebCompanionTaskOperation`
- **gRPC method:** `/MFiles.IRPCWebCompanionTaskOperation/GetWebCompanionTask`
- **HTTP (mf-http-grpc):** `POST /grpc/v1/get-web-companion-task`
- **Request:** [`GetWebCompanionTaskRequest`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCWebCompanionTaskOperation/GetWebCompanionTask/index.md#request)
- **Response:** [`GetWebCompanionTaskResponse`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCWebCompanionTaskOperation/GetWebCompanionTask/index.md#response)
- **Book and level:** Server integration API, specialized
- **Kind:** write
- **Session:** Not needed: the call can be made before logging in.
- **Idempotent:** no
- **Returns metadata structure version:** no
- **Streaming:** none (unary)

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

## Remarks

**For M-Files components only.** M-Files Web Companion calls it to pick up a task that M-Files
Web stored. Applications should not call it.

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

## Request: GetWebCompanionTaskRequest

> 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 |
|---|---|---|
| `get_web_companion_request` | [`WebCompanionFetchTask`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.WebCompanionFetchTask/index.md) | Web Companion Task information. |
| `get_web_companion_request.id` | `int64` | ID of the web companion task record. |
| `get_web_companion_request.guid` | `string` | Vault GUID (uniquely identifies the vault). |
| `get_web_companion_request.app_id` | `string` | Web Companion App ID. |
| `get_web_companion_request.secret_key` | `string` | App secret key. |

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

## Response: GetWebCompanionTaskResponse

> 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 |
|---|---|---|
| `id` | `bytes` | For M-Files Web Companion. |
| `web_companion_task_info` | [`WebCompanionTaskInfo`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.WebCompanionTaskInfo/index.md) | The stored task. |
| `web_companion_task_info.data` | `string` | The Web Companion task data. |
| `web_companion_task_info.action_type` | [`WebCompanionActionType`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.WebCompanionActionType/index.md) | Web Companion Task Action type. Values: `WEB_COMPANION_ACTION_TYPE_VIEW` (0), `WEB_COMPANION_ACTION_TYPE_EDIT` (1), `WEB_COMPANION_ACTION_TYPE_CHECKIN` (2), `WEB_COMPANION_ACTION_TYPE_SAVE_FILE_EXTENSION` (3), `WEB_COMPANION_ACTION_TYPE_CO_AUTHOR` (4). |
