Hierarchy

Constructors

Methods

  • Parameters

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

    Returns Promise<string>

    Description

    Disable OTP for a given OTP Type.

    See

    https://help.tago.io/portal/en/kb/articles/526-two-factor-authentication Two-factor Authentication (2FA)

    Example

    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>

    Description

    Edit account.

    Example

    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;
      }
      • email: string
      • password: string
    • typeOTP: OTPType

    Returns Promise<string>

    Description

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

    See

    https://help.tago.io/portal/en/kb/articles/526-two-factor-authentication Two-factor Authentication (2FA)

    Example

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

    Description

    Gets all account information.

    Example

    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
    • Optional region: RegionsObj | Regions

    Returns Promise<string>

    Description

    Confirm account creation.

    Example

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

    Returns Promise<string>

    Description

    Create new TagoIO account.

    Example

    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
    • Optional region: RegionsObj | Regions

    Returns Promise<string>

    Description

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

    Example

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

    Returns Promise<LoginResponse>

    Description

    Retrieve list of profiles for login and do Login.

    Example

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

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

    Returns Promise<string>

    Description

    Request the PIN Code for a given OTP Type.

    Example

    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
    • Optional region: RegionsObj | Regions

    Returns Promise<string>

    Description

    Re-send confirmation account email.

    Example

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