# deleteSharePermission()

## Syntax

```javascript
deleteSharePermission: (
    shareId: string | number, 
    token?: string
)
```

This method is used to unshare a file.

## Parameters

<table><thead><tr><th width="123">Name</th><th width="167">Type</th><th width="108">Required</th><th>Description</th></tr></thead><tbody><tr><td>shareId</td><td>string or number</td><td>Yes</td><td>The share id.</td></tr><tr><td>token</td><td>string</td><td>No</td><td>The token of user.</td></tr></tbody></table>

## Example

```javascript
  import { deleteSharePermission } from "@eueno/lib-browser";
  
  const unShare = async () => {
    try {
      let shareId = "46";
      await deleteSharePermission(shareId);
    } catch (error) {
      console.log(error);
    }
  };
```

Response of example:

```javascript
{"msg":"success"}
```
