# IRPCSharedLinks.DeleteSharedLink

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/DeleteSharedLink/

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

Deletes a shared link, so that its access key stops working.

- **Service:** [Shared links](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCSharedLinks/index.md) `MFiles.IRPCSharedLinks`
- **gRPC method:** `/MFiles.IRPCSharedLinks/DeleteSharedLink`
- **HTTP (mf-http-grpc):** `POST /grpc/v1/delete-shared-link`
- **Request:** [`DeleteSharedLinkRequest`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCSharedLinks/DeleteSharedLink/index.md#request)
- **Response:** [`DeleteSharedLinkResponse`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCSharedLinks/DeleteSharedLink/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

- Read-only and other non-visitor links: the creator, or a user with the vault right
  `see_all_objects`, can delete them; others get "Access denied.".
- External links: any user who can see the full list of visitors (see
  `visitor_list_restricted` in
  [GetExternalSharingSettings](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCSharedLinks/GetExternalSharingSettings/index.md)) can
  delete the link, including links that other users created. The link and its recipients are
  removed.
- Visitor links: only the recipients are removed; the link itself remains.
- An unknown or already deleted key fails with "The link is either expired or invalid.".

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

## Request: DeleteSharedLinkRequest

> 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 |
|---|---|---|
| `access_key` | `string` | The access key of the link. |

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

## Response: DeleteSharedLinkResponse

No fields.

<a id="related"></a>

## Related methods

- [GetExternalSharingSettings](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCSharedLinks/GetExternalSharingSettings/index.md): Tells whether sharing is enabled in the vault and what the caller may do with external links.
