Web SDK
  • Home
  • Overview
  • Getting started
  • References
    • Authentication
    • Account
      • Users
    • Notifications
    • Bookmark
    • 2FA
    • Collection
    • Connection filters
    • Feed
    • File Upload
    • Invite
    • Messaging
    • Payment
    • Reviews
    • Search
    • Verification
      • Supported document type
      • List of expected ISO countries
    • Wallet
      • Withdrawal
  • Tutorial
  • Web API
Powered by GitBook
On this page
  • Get a user
  • Get the list of users
  1. References
  2. Account

Users

With the Pakt SDK, Chainsite builders can:

PreviousAccountNextNotifications

Last updated 11 months ago

If your chainsite has 2FA activated, click on how to implement this feature.

Get a user

Retrieve a user information, using their _id. The authenticated user jwt token is required to implement this feature.

This feature returns the IUser.

export const getAUser = async (userId: string, authToken: string) => {
    const get: ResponseDto<IUser> = await init.account.getAUser(
      userId,
      authToken
    );
};

Get the list of users

With the PAKT SDK, a list of users can be retrieved, filtered and paginated to get a particular list of users. The FilterUserDto is used to filter search results.

FilterUserDto

FilterUserDto is used to filter search results, all fields are optional.

Fields
Description
Type

page

The page in particular to filter

number

limit

The total number of users to retrieve, defaults to 12.

number

sort

Identifier to sort by. Defaults to sorting by the score in descending order

string | score

type

The type of users to filter for.

recipient | creator

search

Field entry to allow filter by either lastName or the firstName

string

range

Field entry to search for user between two score. For example ?range=64,84 The minimum score first, then the maximum score

string

tags

Field entry to search for a tag(s) For example: ?tag=NodeJS,Typescript

string

owner

Identifer to filter by the user, ensuring that the users bookmarked by the authenticated user is ensured

boolean

Get a user
Get the list of users
here