# IRPCSharedLinks.SetSharedLinkRecipients

Location: [gRPC API](https://developer.m-files.com/APIs/gRPC-API/index.md) > [Vault API](https://developer.m-files.com/APIs/gRPC-API/vault/index.md) > [Shared links](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCSharedLinks/index.md)

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

Badges: `Vault API / standard` `write` `session or assertion` `returns metadata structure version`

Updates the expiration time and access type of visitors of external links.

- **Service:** [Shared links](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCSharedLinks/index.md) `MFiles.IRPCSharedLinks`
- **gRPC method:** `/MFiles.IRPCSharedLinks/SetSharedLinkRecipients`
- **HTTP (mf-http-grpc):** `POST /grpc/v1/set-shared-link-recipients`
- **Request:** [`SetSharedLinkRecipientsRequest`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCSharedLinks/SetSharedLinkRecipients/index.md#request)
- **Response:** [`SetSharedLinkRecipientsResponse`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCSharedLinks/SetSharedLinkRecipients/index.md#response)
- **Book and level:** Vault API, standard
- **Kind:** write
- **Session:** Required: a session (mfiles-session-id-bin metadata) or a session assertion (x-mf-session-assertion metadata).
- **Idempotent:** no
- **Returns metadata structure version:** yes (in the mfiles-metadata-version-bin trailer)
- **Streaming:** none (unary)

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

## Remarks

- Each entry names a link (`access_key`) and a recipient (`recipient.email`, the plain
  address). `recipient.expires_at_utc` must be in the future; otherwise the call fails with
  "The parameter is incorrect.".
- Users who cannot see the full list of visitors can update only the recipients they added;
  other entries are left unchanged.

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

## Request: SetSharedLinkRecipientsRequest

> 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 |
|---|---|---|
| `recipients[]` | repeated [`SetSharedLinkRecipient`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.SetSharedLinkRecipient/index.md) | The recipients to update, each with the link's `access_key` and the new `expires_at_utc` and `external_shared_link_access_type`. |
| `recipients[].access_key` | `string` | The access key of the shared link. |
| `recipients[].recipient` | [`SharedLinkRecipient`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.SharedLinkRecipient/index.md) | The information about the shared link recipient linked to the access key to update expiration time and access type. |
| `recipients[].recipient.email` | `string` | The recipient email. |
| `recipients[].recipient.access_time` | [`google.protobuf.Timestamp`](https://protobuf.dev/reference/protobuf/google.protobuf/#timestamp) | The access time for the shared link. Is set by the server. |
| `recipients[].recipient.created_by_user` | `int32` | The creator of this shared Link. |
| `recipients[].recipient.shared_link_notification` | [`SharedLinkNotification`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.SharedLinkNotification/index.md) | Shared link notification type. Values: `SHARED_LINK_NOTIFICATION_NONE` (0), `SHARED_LINK_NOTIFICATION_ALWAYS` (1). |
| `recipients[].recipient.expires_at_utc` | [`google.protobuf.Timestamp`](https://protobuf.dev/reference/protobuf/google.protobuf/#timestamp) | The expiration time for the shared link. Use FILETIME_ZERO to indicate no expiration time. |
| `recipients[].recipient.external_shared_link_access_type` | [`ExternalSharedLinkAccessType`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.ExternalSharedLinkAccessType/index.md) | The access type of the recipient. Values: `EXTERNAL_SHARED_LINK_ACCESS_TYPE_UNINITIALIZED` (0), `EXTERNAL_SHARED_LINK_ACCESS_TYPE_DOWNLOAD` (1), `EXTERNAL_SHARED_LINK_ACCESS_TYPE_PREVIEW` (2), `EXTERNAL_SHARED_LINK_ACCESS_TYPE_EDIT` (3). |
| `recipients[].recipient.created_by_user_name` | `string` | The user who created the shared link. |

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

## Response: SetSharedLinkRecipientsResponse

> 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 |
|---|---|---|
| `recipients[]` | repeated [`SetSharedLinkRecipient`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.SetSharedLinkRecipient/index.md) | The updated recipients. |
| `recipients[].access_key` | `string` | The access key of the shared link. |
| `recipients[].recipient` | [`SharedLinkRecipient`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.SharedLinkRecipient/index.md) | The information about the shared link recipient linked to the access key to update expiration time and access type. |
| `recipients[].recipient.email` | `string` | The recipient email. |
| `recipients[].recipient.access_time` | [`google.protobuf.Timestamp`](https://protobuf.dev/reference/protobuf/google.protobuf/#timestamp) | The access time for the shared link. Is set by the server. |
| `recipients[].recipient.created_by_user` | `int32` | The creator of this shared Link. |
| `recipients[].recipient.shared_link_notification` | [`SharedLinkNotification`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.SharedLinkNotification/index.md) | Shared link notification type. Values: `SHARED_LINK_NOTIFICATION_NONE` (0), `SHARED_LINK_NOTIFICATION_ALWAYS` (1). |
| `recipients[].recipient.expires_at_utc` | [`google.protobuf.Timestamp`](https://protobuf.dev/reference/protobuf/google.protobuf/#timestamp) | The expiration time for the shared link. Use FILETIME_ZERO to indicate no expiration time. |
| `recipients[].recipient.external_shared_link_access_type` | [`ExternalSharedLinkAccessType`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.ExternalSharedLinkAccessType/index.md) | The access type of the recipient. Values: `EXTERNAL_SHARED_LINK_ACCESS_TYPE_UNINITIALIZED` (0), `EXTERNAL_SHARED_LINK_ACCESS_TYPE_DOWNLOAD` (1), `EXTERNAL_SHARED_LINK_ACCESS_TYPE_PREVIEW` (2), `EXTERNAL_SHARED_LINK_ACCESS_TYPE_EDIT` (3). |
| `recipients[].recipient.created_by_user_name` | `string` | The user who created the shared link. |
