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

    Class Account

    Hierarchy

    Index

    Constructors

    Methods

    • Parameters

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

      Returns Promise<string>

      Disable OTP for a given OTP Type.

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

      Returns Promise<string>

      Edit account.

      const account = new Account({ token: "YOUR-PROFILE-TOKEN" });
      const result = await account.edit({ name: "New Name" });
      console.log(result); // Account Successfully Updated
    • Parameters

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

      Returns Promise<string>

      Enable OTP for a given OTP Type. You will be requested to confirm the operation with a pin code.

      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);
    • Returns Promise<AccountInfo>

      Gets all account information.

      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, ... }
    • Parameters

      • token: string
      • Optionalregion: RegionsObj | Regions

      Returns Promise<string>

      Accept a team member invitation to become a profile's team member.

      https://help.tago.io/portal/en/kb/articles/106-sharing-your-profile for Team Management - Sharing your profile

      account = new Account({ token: "YOUR-PROFILE-TOKEN" });
      const result = await account.acceptTeamInvitation("invitationToken");
      console.log(result);
    • Parameters

      • token: string
      • Optionalregion: RegionsObj | Regions

      Returns Promise<string>

      Confirm account creation.

      const account = new Account({ token: "YOUR-PROFILE-TOKEN" });
      const result = await account.confirmAccount("confirmationToken");
      console.log(result);
    • Parameters

      Returns Promise<string>

      Create new TagoIO account.

      const account = new Account({ token: "YOUR-PROFILE-TOKEN" });
      const result = await account.create({ name: "New Account", email: "user@example.com", password: "password" });
      console.log(result);
    • Parameters

      • token: string
      • Optionalregion: RegionsObj | Regions

      Returns Promise<string>

      Decline a team member invitation to become a profile's team member.

      const account = new Account({ token: "YOUR-PROFILE-TOKEN" });
      const result = await account.declineTeamInvitation("invitationToken");
      console.log(result);
    • Parameters

      • credentials: { email: string; password: string }
      • typeOTP: OTPType
      • Optionalregion: RegionsObj | Regions

      Returns Promise<string>

      Request the PIN Code for a given OTP Type.

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

      • email: string
      • Optionalregion: RegionsObj | Regions

      Returns Promise<string>

      Re-send confirmation account email.

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