Delete account.
https://help.tago.io/portal/en/kb/articles/210-deleting-your-account Deleting Your Account
const account = new Account({ token: "YOUR-PROFILE-TOKEN" });
const result = await account.delete();
console.log(result);
```typescript
Disable OTP for a given OTP Type.
https://help.tago.io/portal/en/kb/articles/526-two-factor-authentication Two-factor Authentication (2FA)
const account = new Account({ token: "YOUR-PROFILE-TOKEN" });
const result = await account.disableOTP({ email: "user@example.com", password: "password" }, "sms");
console.log(result);
Edit account.
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.
https://help.tago.io/portal/en/kb/articles/526-two-factor-authentication Two-factor Authentication (2FA)
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
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, ... }
Change account password.
https://help.tago.io/portal/en/kb/articles/209-resetting-my-password Resetting My Password TODO: not working
const account = new Account({ token: "YOUR-PROFILE-TOKEN" });
const result = await account.passwordChange("newPassword");
console.log(result);
Static
acceptOptional
region: RegionsObj | RegionsAccept 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);
Static
confirmOptional
region: RegionsObj | RegionsConfirm account creation.
const account = new Account({ token: "YOUR-PROFILE-TOKEN" });
const result = await account.confirmAccount("confirmationToken");
console.log(result);
Static
createOptional
region: RegionsObj | RegionsCreate 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);
Static
declineOptional
region: RegionsObj | RegionsDecline 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);
Static
loginOptional
region: RegionsObj | RegionsRetrieve list of profiles for login and do Login.
const account = new Account({ token: "YOUR-PROFILE-TOKEN" });
const loginResponse = await account.login({ email: "user@example.com", password: "password" });
console.log(loginResponse);
Static
passwordOptional
region: RegionsObj | RegionsSend password recover email.
https://help.tago.io/portal/en/kb/articles/209-resetting-my-password Resetting My Password
const account = new Account({ token: "YOUR-PROFILE-TOKEN" });
const result = await account.passwordRecover("user@example.com");
console.log(result);
Static
requestRequest 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);
Static
resendOptional
region: RegionsObj | RegionsRe-send confirmation account email.
const account = new Account({ token: "YOUR-PROFILE-TOKEN" });
const result = await account.resendConfirmation("user@example.com");
console.log(result);
Static
tokenOptional
region: RegionsObj | RegionsGenerates and retrieves a new token for the account.
https://help.tago.io/portal/en/kb/articles/495-account-token Account Token
const account = new Account({ token: "YOUR-PROFILE-TOKEN" });
const token = await account.tokenCreate({ name: "New Token" });
console.log(token);
```typescript
Description
Confirm OTP enabling process for a given OTP Type.
See
https://help.tago.io/portal/en/kb/articles/526-two-factor-authentication Two-factor Authentication (2FA)
Example