# getFileListById()

## Syntax

```javascript
getFileListById(ids: Array<string> | Array<number>, token?: string)
```

The method gets a list of file information by file ID.

## Parameters

<table><thead><tr><th width="98">Name</th><th width="169">Type</th><th width="108">Required</th><th>Description</th></tr></thead><tbody><tr><td>ids</td><td>Array&#x3C;string> or Array&#x3C;number></td><td>Yes</td><td>Array of file 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 “<code>eueno-token</code>".</td></tr></tbody></table>

## Example

```javascript
import { getFileById } from "@eueno/lib-browser";

const getDetailFiles = async () => {
let id = "20086";
 try {
   const response = await getFileListById(id);
   console.log(response?.data?.data);
 } catch (error) {
   console.log(error);
 }
};
```

Response of example:

<pre class="language-javascript"><code class="lang-javascript"><strong>"data": [
</strong>      {
            "id": "20086",
            "name": "loading-icon (1).png",
            "nameNo": 1,
            "virtualPath": "0xa4ea6...bf0e65c8a32/new/loading-icon (1).png",
            "virtualCloudPath": "0xa4ea61c9...89531-f882d37lllmz.loading-icon (1).png",
            "path": "0xa4ea61c99...82d37lllmz.loading-icon (1).png",
            "url": "https://node1-gateway-ipfs.eueno.io/ipfs/Qm...34ASACrTRDbyLiWi3",
            "backupUrl": "https://node1-gateway-ipfs.eueno.io/ipfs/QmVY...CrTRDbyLiWi3",
            "size": "26529",
            "mimeType": "image/png",
            "method": "ENCRYPT",
            "torrentSize": 4,
            "torrentUrl": "https://node1-gateway-ipfs.eueno.io/ipfs/QmSU...Z2FNvgzkJ7",
            "backupTorrentUrl": "https://node1-gateway-ipfs.eueno.io/ipfs/QmSUzA6...Z2FNvgzkJ7",
            "encryptKey": "af071851a69...b1a2a8ae52da43a76",
            "createdAt": "2023-05-30T04:26:30.629Z",
            "updatedAt": "2023-05-30T04:26:33.912Z"
        },
  ]
</code></pre>
