Account¶
Manage your TagoIO account, authentication, and security settings.
info¶
Gets all account information including settings, preferences, and OTP configuration.
See: Edit Account
Returns:
# If receive an error "Authorization Denied", check your account token permissions. from tagoio_sdk import Resources resources = Resources() account_info = resources.account.info() print(account_info) # {'id': 'account-id', 'name': 'My Account', ...}
edit¶
Edit current account information such as name, timezone, company, and preferences.
See: Edit Account
Parameters:
accountObj: dictAccount information to updateReturns:
str# If receive an error "Authorization Denied", check your account token permissions. from tagoio_sdk import Resources resources = Resources() result = resources.account.edit({ "name": "Updated Account Name", "timezone": "America/New_York", "company": "My Company" }) print(result) # Account Successfully Updated
delete¶
Delete current account. This action is irreversible and will remove all profiles and data.
Returns:
str# If receive an error "Authorization Denied", check your account token permissions. # WARNING: This action is irreversible! from tagoio_sdk import Resources resources = Resources() result = resources.account.delete() print(result) # Account Successfully Deleted
passwordChange¶
Change account password for the authenticated user.
Parameters:
password: strNew passwordReturns:
str# If receive an error "Authorization Denied", check your account token permissions. from tagoio_sdk import Resources resources = Resources() result = resources.account.passwordChange("new-secure-password") print(result) # Password changed successfully
enableOTP¶
Enable OTP (One-Time Password) for a given OTP Type (authenticator, sms, or email). You will be requested to confirm the operation with a pin code.
See: Two-Factor Authentication
Parameters:
credentials: dictDictionary with email and passwordtypeOTP: OTPTypeType of OTP: “authenticator”, “sms”, or “email”Returns:
str# If receive an error "Authorization Denied", check your account token permissions. from tagoio_sdk import Resources resources = Resources() result = resources.account.enableOTP( {"email": "user@example.com", "password": "your-password"}, "email" ) print(result) # OTP enabled, confirmation required
disableOTP¶
Disable OTP (One-Time Password) for a given OTP Type (authenticator, sms, or email).
See: Two-Factor Authentication
Parameters:
credentials: dictDictionary with email and passwordtypeOTP: OTPTypeType of OTP: “authenticator”, “sms”, or “email”Returns:
str# If receive an error "Authorization Denied", check your account token permissions. from tagoio_sdk import Resources resources = Resources() result = resources.account.disableOTP( {"email": "user@example.com", "password": "your-password"}, "authenticator" ) print(result) # OTP disabled successfully
confirmOTP¶
Confirm OTP enabling process for a given OTP Type (authenticator, sms, or email).
See: Two-Factor Authentication
Parameters:
pinCode: strSix-digit PIN codetypeOTP: OTPTypeType of OTP: “authenticator”, “sms”, or “email”Returns:
str# If receive an error "Authorization Denied", check your account token permissions. from tagoio_sdk import Resources resources = Resources() result = resources.account.confirmOTP("123456", "email") print(result) # OTP confirmed successfully
tokenCreate¶
Generates and retrieves a new token for the account. This is a static method that doesn’t require authentication.
See: Account Token
Parameters:
tokenParams: TokenCreateInfoToken creation parametersOptional region: RegionsTagoIO Region Server (default: USA)Returns:
dictfrom tagoio_sdk.modules.Resources.Account import Account token_result = Account.tokenCreate({ "profile_id": "profile-id-123", "email": "user@example.com", "password": "your-password", "pin_code": "123456", "otp_type": "email", "name": "My API Token" }) print(token_result["token"]) # your-new-token-123
login¶
Retrieve list of profiles for login and perform authentication. This is a static method that doesn’t require authentication.
See: Login to Account
Parameters:
credentials: LoginCredentialsLogin credentials including email, password, OTP type, and PIN codeOptional region: RegionsTagoIO Region Server (default: USA)Returns:
from tagoio_sdk.modules.Resources.Account import Account login_result = Account.login({ "email": "user@example.com", "password": "your-password", "otp_type": "email", "pin_code": "123456" }) print(login_result) # {'type': 'user', 'id': '...', 'profiles': [...]}
passwordRecover¶
Send password recovery email to the specified address. This is a static method that doesn’t require authentication.
Parameters:
email: strEmail address for password recoveryOptional region: RegionsTagoIO Region Server (default: USA)Returns:
strfrom tagoio_sdk.modules.Resources.Account import Account result = Account.passwordRecover("user@example.com") print(result) # Email sent successfully
create¶
Create a new TagoIO account. This is a static method that doesn’t require authentication.
Parameters:
createParams: AccountCreateInfoAccount creation parametersOptional region: RegionsTagoIO Region Server (default: USA)Returns:
strfrom tagoio_sdk.modules.Resources.Account import Account result = Account.create({ "name": "John Doe", "email": "john@example.com", "password": "secure-password", "cpassword": "secure-password", "timezone": "America/New_York", "company": "My Company", "newsletter": False }) print(result) # Account created successfully
resendConfirmation¶
Re-send confirmation account email to the specified address. This is a static method that doesn’t require authentication.
Parameters:
email: strEmail address to resend confirmationOptional region: RegionsTagoIO Region Server (default: USA)Returns:
strfrom tagoio_sdk.modules.Resources.Account import Account result = Account.resendConfirmation("user@example.com") print(result) # Confirmation email sent
confirmAccount¶
Confirm account creation using the token sent via email. This is a static method that doesn’t require authentication.
Parameters:
token: strConfirmation token from emailOptional region: RegionsTagoIO Region Server (default: USA)Returns:
strfrom tagoio_sdk.modules.Resources.Account import Account result = Account.confirmAccount("confirmation-token-123") print(result) # Account confirmed successfully
requestLoginPINCode¶
Request the PIN Code for a given OTP Type (authenticator, sms, or email). This is a static method that doesn’t require authentication.
See: Two-Factor Authentication
Parameters:
Returns:
strfrom tagoio_sdk.modules.Resources.Account import Account result = Account.requestLoginPINCode( {"email": "user@example.com", "password": "your-password"}, "email" ) print(result) # PIN code sent
acceptTeamInvitation¶
Accept a team member invitation to become a profile’s team member. This is a static method that doesn’t require authentication.
Parameters:
token: strInvitation token from emailOptional region: RegionsTagoIO Region Server (default: USA)Returns:
strfrom tagoio_sdk.modules.Resources.Account import Account result = Account.acceptTeamInvitation("invitation-token-123") print(result) # Invitation accepted
declineTeamInvitation¶
Decline a team member invitation to become a profile’s team member. This is a static method that doesn’t require authentication.
Parameters:
token: strInvitation token from emailOptional region: RegionsTagoIO Region Server (default: USA)Returns:
strfrom tagoio_sdk.modules.Resources.Account import Account result = Account.declineTeamInvitation("invitation-token-123") print(result) # Invitation declined