TagoIO SDK for JavaScript and TypeScript
    Preparing search index...

    Class Account

    Index

    Constructors

    Methods

    • Edit account.

      Parameters

      Returns Promise<string>

      const account = new Account({ token: "YOUR-PROFILE-TOKEN" });
      const result = await account.edit({ name: "New Name" });
      console.log(result); // Account Successfully Updated
    • Enable OTP for a given OTP Type. You will be requested to confirm the operation with a pin code.

      Parameters

      • credentials: { email: string; password: string }
      • typeOTP: OTPType

      Returns Promise<string>

      If receive an error "Authorization Denied", check policy in Access Management.

      const account = new Account({ token: "YOUR-PROFILE-TOKEN" });
      const result = account.enableOTP({ email: "user@example.com", password: "password" }, "sms");
      console.log(result);
    • Gets all account information.

      Returns Promise<AccountInfo>

      If receive an error "Authorization Denied", check policy Account / Access Account Information in Access Management.

      const accountInfo = await Resources.account.info();
      console.log(accountInfo); // { active: true, blocked: false, created_at: 2023-02-21T15:17:35.759Z, ... }
    • Confirm account creation.

      Parameters

      Returns Promise<string>

      const account = new Account({ token: "YOUR-PROFILE-TOKEN" });
      const result = await account.confirmAccount("confirmationToken");
      console.log(result);
    • Decline a team member invitation to become a profile's team member.

      Parameters

      Returns Promise<string>

      const account = new Account({ token: "YOUR-PROFILE-TOKEN" });
      const result = await account.declineTeamInvitation("invitationToken");
      console.log(result);
    • Request the PIN Code for a given OTP Type.

      Parameters

      Returns Promise<string>

      const account = new Account({ token: "YOUR-PROFILE-TOKEN" });
      const result = await account.requestLoginPINCode({ email: "user@example.com", password: "password" }, "sms");
      console.log(result);
    • Re-send confirmation account email.

      Parameters

      Returns Promise<string>

      const account = new Account({ token: "YOUR-PROFILE-TOKEN" });
      const result = await account.resendConfirmation("user@example.com");
      console.log(result);