# getProjectInfo()

## Syntax

```javascript
getProjectInfo(projectId: string, token?: string)
```

Gets project information.

## Parameters

<table><thead><tr><th width="116">Name</th><th width="121">Type</th><th width="108">Required</th><th>Description</th></tr></thead><tbody><tr><td>projectId</td><td>string</td><td>Yes</td><td>The project 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>

## Returns

Promise return object with the structure looks as follows:

* &#x20; totalFile: The number of files/folders in the project
* &#x20; totalSize: The project size (bytes)
* &#x20;  id: The project id
* &#x20;  name: The project name
* &#x20;  ownerAddress: The address of the account which created the project
* &#x20;  updatedAt: The last date time update project
* &#x20;  createdAt: The date-time create the project

## Example

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

const getData = async () => {
   try {
     if (!token || !projectId) return;
     const response = await getBucketInfo(projectId);
     if (response?.status === 200) {
       console.log(response?.data?.data);
     } else toast.error("Error getting project information");
   } catch (error) {
     console.error(error);
   }
 };

```

Response of example:

```javascript
{
    "msg": "success",
    "data": {
        "id": 1,
        "name": "ProjectName",
        "ownerAddress": "0x…",
        "totalFile": "0",
        "totalSize": "0"
        "updatedAt": "2023-03-08T15:02:45.881Z",
        "createdAt": "2023-03-08T10:43:53.677Z"
    }
}

```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.eueno.io/eueno-libraries/eueno-lib-browser/getprojectinfo.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
