Eueno
  • EUENO – Decentralized Encrypting Blockchain Oracles for Web3
    • Litepaper
    • Use Cases
  • Get Started
    • Prerequisites
    • Buckets
      • Create a bucket
      • Delete a bucket
    • Files
      • Upload a file
      • View a file
      • Delete a file
      • Share a file
  • Pricing
  • Eueno libraries
    • @eueno/lib-browser
      • Installation
      • Setup
      • Create key (generate a key for encrypting the file(s))
      • login()
      • useEuenoContext()
      • getUserInfo()
      • updateUserInfo()
      • createProject()
      • getProjectInfo()
      • getProjects()
      • getFilesListByFolder()
      • deleteProject()
      • createFolder()
      • uploadFolder()
      • Get folder detail
      • deleteFolder()
      • uploadFile()
      • uploadFileWithSignedUrl()
      • getCid()
      • getFileById()
      • getFileListById()
      • Get file detail
        • getDetailFile()
        • getDetailUnencryptedFile()
        • getDetailEncryptedFile()
      • getDetailMultiEncryptedFiles()
      • deleteFile()
      • shareFile()
      • shareMultiFile()
      • deleteSharePermission()
      • getShareList()
      • getShareListToMe ()
    • @eueno/lib-node
      • Create eueno client
      • Create project key
      • Create project
      • Upload file
      • Upload folder
      • Get file
      • Get list file
      • Share file
      • Get shared files
      • Create folder
      • Create Account
      • Decrypt Get Key Aes
      • Decrypt File by Key Aes
  • Policies
    • Privacy Policy
    • Terms of Service
Powered by GitBook
On this page
  • Syntax
  • Parameters
  • Example
  1. Eueno libraries
  2. @eueno/lib-browser

getUserInfo()

Syntax

getUserInfor(token)

After login, you can use this method to get user information.

Parameters

Name
Type
Required
Description

token

string

Yes

The authentication token response from Eueno API when login. After login success, this token was saved in local storage with the name "eueno-token".

Example

import { getUserInfo } from "@eueno/lib-browser";

const getData = async () => {
   try {
     const toke = window.localStorage.getItem(“eueno-token”);
     const response = await getUserInfo(token);
     console.log(response);
   } catch (error) {
     console.log(error);
   }
 };

Response of example:

"data": 
{
        "name_tag": "no_name",
        "balance_usd": 0,
        "avatar": null,
        "status": "ACTIVE",
        "_id": "63a9120afaeb20de89e9ac85",
        "account": "0xf069…87f15",
        "memo": "350648…6224",
        "createAt": "2022-12-26T03:16:26.903Z",
        "pack_info": 
        {
            "_id": "63a3cba5d8fd244d867c70d1",
            "price_to_usd": 10,
            "discount": 0,
            "project_size": 102400,
            "description": "payment",
            "type": "PAYMENT"
        }
}
PrevioususeEuenoContext()NextupdateUserInfo()

Last updated 2 years ago