# SharedLinkInfo

Location: [gRPC API](https://developer.m-files.com/APIs/gRPC-API/index.md) > [Reference](https://developer.m-files.com/APIs/gRPC-API/Reference/index.md) > [Messages](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/index.md)

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

Struct for shared link information.

- **Full name:** `MFiles.SharedLinkInfo`
- **Proto file:** [`mfiles/structs.proto`](https://developer.m-files.com/APIs/gRPC-API/downloads/proto/mfiles/structs.proto)

<a id="fields"></a>

## Fields

| Field | Type | Number | Description |
|---|---|---|---|
| <a id="f-access_key"></a>`access_key` | `string` | 1 | The access key of the shared link. |
| <a id="f-description"></a>`description` | `string` | 2 | The description of the shared link. |
| <a id="f-created_at_utc"></a>`created_at_utc` | [`google.protobuf.Timestamp`](https://protobuf.dev/reference/protobuf/google.protobuf/#timestamp) | 3 | The creation time for the shared link. Is set by the server. Should be FILETIME_ZERO, when creating a new link. |
| <a id="f-expires_at_utc"></a>`expires_at_utc` | [`google.protobuf.Timestamp`](https://protobuf.dev/reference/protobuf/google.protobuf/#timestamp) | 4 | The expiration time for the shared link. Use FILETIME_ZERO to indicate no expiration time. |
| <a id="f-obj_ver"></a>`obj_ver` | [`ObjVer`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjVer/index.md) | 5 | The object version referenced by the shared link. |
| <a id="f-created_by_user"></a>`created_by_user` | `int32` | 6 | The creator of this shared Link. |
| <a id="f-file_ver"></a>`file_ver` | [`FileVer`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.FileVer/index.md) | 7 | The file version referenced by the shared link. |
| <a id="f-shared_link_type"></a>`shared_link_type` | [`SharedLinkType`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.SharedLinkType/index.md) | 8 | Type of the shared link. Values: `SHARED_LINK_TYPE_READ_ONLY` (0), `SHARED_LINK_TYPE_CO_AUTHORING` (1), `SHARED_LINK_TYPE_WOPIREADONLY` (2), `SHARED_LINK_TYPE_WOPIEDIT` (3), `SHARED_LINK_TYPE_VISITOR` (4), `SHARED_LINK_TYPE_EXTERNAL` (5). |
| <a id="f-is_anyone_access_granted"></a>`is_anyone_access_granted` | `bool` | 9 | True if any user has granted public access to the document. |
| <a id="f-anyone_access_granted_by_user"></a>`anyone_access_granted_by_user` | `int32` | 10 | The user who has granted public access to the document. |
| <a id="f-external_shared_link_access_type"></a>`external_shared_link_access_type` | [`ExternalSharedLinkAccessType`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.ExternalSharedLinkAccessType/index.md) | 11 | Access type of the external shared link. 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). |
| <a id="f-created_by_user_name"></a>`created_by_user_name` | `string` | 12 | The user who created the shared link. |
| <a id="f-anyone_access_granted_by_user_name"></a>`anyone_access_granted_by_user_name` | `string` | 13 | The user who granted public access. |

<a id="used-by-methods"></a>

## Used by methods

- [IRPCSharedLinks.CreateSharedLink](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCSharedLinks/CreateSharedLink/index.md): Creates a shared link to one file of an object and returns it with its new access key.
- [IRPCSharedLinks.GetExternalLinks](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCSharedLinks/GetExternalLinks/index.md): Lists the external links of an object.
- [IRPCSharedLinks.GetSharedLink](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCSharedLinks/GetSharedLink/index.md): Gets one shared link by its access key.
- [IRPCSharedLinks.GetSharedLinks](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCSharedLinks/GetSharedLinks/index.md): Lists the shared links that the caller created, or all links for users who can see all objects.
- [IRPCSharedLinks.GetSharedLinksByObject](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCSharedLinks/GetSharedLinksByObject/index.md): Lists the shared links to one object.
- [IRPCSharedLinks.SetSharedLinks](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCSharedLinks/SetSharedLinks/index.md): Updates the access type of shared links, and grants or revokes access for anyone who has the link.

<a id="used-in-fields"></a>

## Used in fields

- [`CreateSharedLinkRequest.sl_info`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCSharedLinks/CreateSharedLink/index.md#request): The link to create: `shared_link_type`, `obj_ver`, `file_ver`, and optionally `description`, `expires_at_utc` (unset for no expiration) and, for external links, `external_shared_link_access_type` and `is_anyone_access_granted`.
- [`CreateSharedLinkResponse.sl_info_result`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCSharedLinks/CreateSharedLink/index.md#response): The created link, including its `access_key`.
- [`GetSharedLinkResponse.sl_info_result`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCSharedLinks/GetSharedLink/index.md#response): The link.
- [`GetSharedLinksResponse.shared_links`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCSharedLinks/GetSharedLinks/index.md#response): The links, including their access keys.
- [`GetSharedLinksByObjectResponse.shared_links`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCSharedLinks/GetSharedLinksByObject/index.md#response): The links to the object.
- [`SetSharedLinksRequest.shared_links`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCSharedLinks/SetSharedLinks/index.md#request): The links to update, identified by `access_key`, with the new `external_shared_link_access_type`, `is_anyone_access_granted` and `expires_at_utc`.
- [`SetSharedLinksResponse.shared_links`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCSharedLinks/SetSharedLinks/index.md#response): The links after the update.
- [`GetExternalLinksResponse.external_shared_links`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCSharedLinks/GetExternalLinks/index.md#response): The external links, including their access keys.
