# getShareList()

## Syntax

```javascript
getShareList(id: string | number, token?: string)
```

Get a list of users that a file/folder was shared with them by file/folder id.

## Parameters

<table><thead><tr><th width="144">Name</th><th width="121">Type</th><th width="108">Required</th><th>Description</th></tr></thead><tbody><tr><td>id</td><td>string or number</td><td>Yes</td><td>The file/folder id</td></tr><tr><td>token</td><td>string</td><td>No</td><td>The authentication token response from Eueno API when login. After login, this token was saved in local storage with the name “eueno-token".</td></tr></tbody></table>

## Example

```javascript
import { getShareList as getShareListLibrary } from "@eueno/lib-browser";
 
const getListShare = async () => {
   try {
     const res = await getShareListLibrary(id, token);
     if (res?.data?.data) console.log(res?.data?.data);
   } catch (error) {
     console.log(error);
   }
 };

```

Response of example:

```javascript
 “data”:    [
 {
            "id": "30",
            "ownerAddress": "0x8bf…07f9",
            "fileId": "216756",
            "projectId": "96",
            "sharedUserAddress": "0xf069ff7…5cf387f15",
            "encryptedKey": "f80703eb7…81681",
            "createdAt": "2023-03-13T08:17:27.544Z",
            "updatedAt": "2023-03-13T08:17:27.544Z",
            "user": {
                "nameTag": "no_name",
                "avatar": ""
            }
        }
]
```
