# IRPCSharedLinksPublic.GetSharedLinkInfo

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

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

Badges: `Vault API / standard` `write` `no session`

Gets the name, extension and size of the file that a shared link points to, without logging in.

- **Service:** [Shared links (anonymous access)](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCSharedLinksPublic/index.md) `MFiles.IRPCSharedLinksPublic`
- **gRPC method:** `/MFiles.IRPCSharedLinksPublic/GetSharedLinkInfo`
- **HTTP (mf-http-grpc):** `POST /grpc/v1/get-shared-link-info`
- **Request:** [`GetSharedLinkInfoRequest`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCSharedLinksPublic/GetSharedLinkInfo/index.md#request)
- **Response:** [`GetSharedLinkInfoResponse`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCSharedLinksPublic/GetSharedLinkInfo/index.md#response)
- **Book and level:** Vault API, standard
- **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

- No session is needed. Set `vault` to the vault GUID and `access_key` to the
  link's key.
- External and visitor links always point to the latest version of the file; read-only links
  to the version they were created for.
- For links shared with named visitors, pass the visitor values in `additional_data` (see the
  service overview).
- For read-only links, the access is recorded in the vault's event log. Add a `CLIENT_IP` entry
  to `additional_data` to include the visitor's IP address in the event.

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

## Request: GetSharedLinkInfoRequest

> 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 |
|---|---|---|
| `vault` | `string` | The vault GUID, for example `{7BBEA0BC-40D8-4BCB-A67D-8A3ACFBDB575}`. |
| `access_key` | `string` | The access key of the shared link. |
| `additional_data[]` | repeated [`NamedValue`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.NamedValue/index.md) | Optional named values: `RECIPIENT_EMAIL`, `RECIPIENT_ACCESSCODE` and `ACCESS_SESSION` for links shared with named visitors, and `CLIENT_IP` for the event log. |
| `additional_data[].key` | `string` | The name of the value. |
| `additional_data[].value` | [`TypedValue`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.TypedValue/index.md) | The value as a serialized bytearray. |
| `additional_data[].value.is_null_value` | `bool` | True if the value is empty. `data` is then unset. |
| `additional_data[].value.type` | [`Datatype`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.Datatype/index.md) | The data type of the value. |
| `additional_data[].value.data` | [`TypedValueUnion`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.TypedValueUnion/index.md) | The value, in the member that matches `type`. Unset for an empty value. |

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

## Response: GetSharedLinkInfoResponse

> 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 |
|---|---|---|
| `result` | [`SharedFileInfo`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.SharedFileInfo/index.md) | The file's title, extension, size and change time. |
| `result.title` | `string` | The title of the file. |
| `result.extension` | `string` | File extension, not including the dot (e.g. "doc"). |
| `result.logical_size` | `int64` | The logical size of the file in bytes. |
| `result.change_time` | [`google.protobuf.Timestamp`](https://protobuf.dev/reference/protobuf/google.protobuf/#timestamp) | The time in UTC the file was last written to or its attributes were changed. |
