Skip to content

Profile

SDK Reference · Resource

Profile

Read and update the authenticated account and its security settings.

method

get()

Get the current profile

Returns the authenticated account, including contact details and the security state needed by account settings screens.

Signature

Promiseclient.profile.get(options: ProfileGetOptions = {}): Promise<ProfileGetResponse>

Parameters

NameTypeRequirementDescription
acceptLanguagestringOptionalPreferred language for human-readable API errors. Supported languages: en, ru, uk, de, it, fr, es, zh-hans, ja. Regional language tags and quality weights are accepted; unsupported or omitted values use English.

Example

const result = await client.profile.get();

Returns

User

The operation completed successfully.

typeUser43fields

Customer account with contact details, security settings, package data, referral information, and managed sub-users visible to the caller.

id
string
Required
—
username
string
Required
Value must contain only letters, numbers, and underscores. It must not start or end with an underscore.
email
string
Required
—
is_reseller
boolean
Optional
Reseller can create sub-users and manage their data.
is_marketer
boolean
Optional
Marketer can manage marketing campaigns and view analytics.
is_superuser
boolean
Optional
Designates that this user has all permissions without explicitly assigning them.
date_joined
string
Required
—
date_joined_ts
number
Required
Timestamp of when the user joined
first_name
string
Optional
—
last_name
string
Optional
—
balance
number
Optional
—
language
LanguageEnum
Optional
—
enumLanguageEnum0fields

* `en` - EN * `de` - DE * `fr` - FR * `it` - IT * `ru` - RU

No fields.

country
string
Optional
—
state
string
Optional
—
city
string
Optional
—
address
string
Optional
—
zip
string
Optional
—
company_name
string
Optional
—
company_address
string
Optional
—
company_city
string
Optional
—
company_postal_code
string
Optional
—
company_country
string
Optional
—
company_vat_number
string
Optional
—
allowed_ips
string[]
Required
List of IP addresses allowed for this user
blocked_domains
string[]
Required
List of domains blocked for this user
connection_limit
number
Optional
The maximum number of concurrent connections allowed for this package.
parent_id
string
Required
ID of the parent user (for sub-accounts)
sub_users
number
Required
Number of sub-users managed by this reseller
referrals
number
Required
Number of users referred by this user
referral_id
string
Optional
—
referral_code
string
Required
—
referral_data_earned
number
Required
—
referral_data_pending
number
Required
—
referral_balance_pending
number
Required
—
referral_balance_earned
number
Required
—
currency
UserCurrency
Required
Currency information for the user's transactions
typeUserCurrency2fields
code
string
Required
—
symbol
string
Required
—
coupons
CouponShort[]
Required
Available coupons for this user
typeCouponShort14fields
id
string
Optional
—
is_expired
boolean
Required
—
is_redeemed
boolean
Required
—
packages
PackageShort[]
Required
—
typePackageShort5fields
id
string
Optional
—
name
string
Required
Unique display name for this package shown to customers and in the admin. Residential Starter Business Pro
alias
string
Required
Lowercase alphanumeric identifier used internally for package resolution and proxy username routing. Cannot be changed without affecting active connections. residential01 bizpro
is_unlimited_data
boolean
Optional
When enabled, users on this package have no data cap. The proxy will not enforce any bandwidth limit.
targeting_options
TargetingOptions
Required
—
typeTargetingOptions25fields
package
string
Required
—
split_char
string
Required
—
value_char
string
Required
—
continent
string
Required
—
country
string
Required
—
region
string
Required
—
city
string
Required
—
asn
string
Required
—
isp
string
Required
—
username
string
Required
—
pool
string
Required
—
location
string
Required
—
location_format
string
Required
—
session
string
Required
—
session_mode_tag
string
Required
—
session_ttl
string
Required
—
session_ttl_format
number
Required
—
os
string
Required
—
os_combined
boolean
Required
—
os_split_char
string
Required
—
os_linux
string
Required
—
os_windows
string
Required
—
os_ios
string
Required
—
os_macos
string
Required
—
os_android
string
Required
—
created
string
Required
—
value
number
Required
Arbitrary coupon value
code
string
Required
Leaving this field empty will generate a random code.
is_multi_use
boolean
Optional
If true, coupon can be used multiple times.
is_available_to_one_time
boolean
Optional
If true, coupon can not be used for one-time package tiers.
type
CouponTypeEnum
Required
—
enumCouponTypeEnum0fields

* `free_data` - Free Data * `monetary` - Money * `percentage` - Percentage

No fields.

limit
number
Optional
Number of times coupon can be used
valid_until
string
Optional
Leave empty for coupons that never expire
marketer
string
Optional
The marketer who owns this coupon. Required if is_marketer is true.
user
string
Required
The user who created this coupon.
data
number
Optional
Present only when SITE_PACKAGE_BASED_AUTH is disabled.
data_spent
number
Optional
Present only when SITE_PACKAGE_BASED_AUTH is disabled.
data_updated
string
Optional
Present only when SITE_PACKAGE_BASED_AUTH is disabled.
proxy_password
string
Optional
Present only when SITE_PACKAGE_BASED_AUTH is disabled.
proxy_password_reset
string
Optional
Present only when SITE_PACKAGE_BASED_AUTH is disabled.
orders
Order[]
Optional
The user's package orders, including inactive orders. Each order contains its own data allowance, usage, ledgers, and proxy credentials. An empty list means the user has no orders.
typeOrder17fields
id
string
Optional
—
is_auto_renewal
boolean
Required
—
auto_renewal_percentage
number
Optional
When this percentage of the data allowance has been consumed, the order is automatically renewed if the user has sufficient balance. Set to 0 to disable auto-renewal. 80 → renew when 80% of data is used
auto_renewal_data
number
Optional
Amount of data in GB to add when auto-renewal is triggered. Set to 0 to use the package default.
package
PackageShort
Required
—
typePackageShort5fields
id
string
Optional
—
name
string
Required
Unique display name for this package shown to customers and in the admin. Residential Starter Business Pro
alias
string
Required
Lowercase alphanumeric identifier used internally for package resolution and proxy username routing. Cannot be changed without affecting active connections. residential01 bizpro
is_unlimited_data
boolean
Optional
When enabled, users on this package have no data cap. The proxy will not enforce any bandwidth limit.
targeting_options
TargetingOptions
Required
—
typeTargetingOptions25fields
package
string
Required
—
split_char
string
Required
—
value_char
string
Required
—
continent
string
Required
—
country
string
Required
—
region
string
Required
—
city
string
Required
—
asn
string
Required
—
isp
string
Required
—
username
string
Required
—
pool
string
Required
—
location
string
Required
—
location_format
string
Required
—
session
string
Required
—
session_mode_tag
string
Required
—
session_ttl
string
Required
—
session_ttl_format
number
Required
—
os
string
Required
—
os_combined
boolean
Required
—
os_split_char
string
Required
—
os_linux
string
Required
—
os_windows
string
Required
—
os_ios
string
Required
—
os_macos
string
Required
—
os_android
string
Required
—
proxy_password
string
Optional
Password used by the customer to authenticate proxy connections. Auto-generated by default — change only if a custom value is needed. Must be between 4 and 64 characters.
proxy_password_reset
string
Optional
Timestamp of the last proxy password change. Read-only — updated automatically whenever the password is rotated.
pools
string[]
Optional
Private proxy pools assigned to this order. Pools restrict which proxy IPs are available to this customer. Leave blank to use the full provider pool.
data
number
Optional
Total data allowance for this order in bytes. 1073741824 = 1 GiB 10737418240 = 10 GiB
data_remaining
number
Required
Integer bytes. Root order: sum of usable ledger balances, not data minus data_spent. Virtual child order: max(data - data_spent, 0), a personal quota that does not guarantee the parent still has usable data.
data_spent
number
Optional
Total bytes consumed from this order's data allowance so far. Updated in real time as the customer uses the proxy.
ledgers
DataLedger[]
Required
Usable, non-expired ledger balances for a purchased root order; empty for a virtual child order using its parent's pool. Not a complete history. Array position does not identify the active ledger or spending order.
typeDataLedger6fields

A purchased data bucket, not a complete transaction history. Finite purchases with an expiration have separate buckets. Compatible non-expiring top-ups and unlimited packages may reuse an existing bucket.

id
string
Required
—
data
number
Required
Total data allocated to this ledger entry in bytes. 1073741824 = 1 GiB 10737418240 = 10 GiB
data_remaining
number
Required
Bytes still available for consumption from this ledger entry. Decremented in FIFO order as the customer uses the proxy. When this reaches zero the entry is exhausted.
expires
string
Required
Date and time when this ledger entry expires and any remaining data is forfeited. Leave blank for entries that do not expire.
updated
string
Required
—
created
string
Required
—
latest_data_top_up
number
Optional
Amount of data added to this order in bytes during the most recent top-up.
latest_data_top_up_date
string
Optional
Timestamp of the most recent data top-up, set when an invoice is fulfilled.
data_updated
string
Required
—
updated
string
Required
—
created
string
Required
—

Throws

ApiError

Normalized API, transport, and response processing failure.

  • kind: "validation"The request arguments or business rules are invalid.
  • kind: "authentication"Authentication credentials are missing, expired, or invalid.
  • kind: "permission"The authenticated account cannot perform this operation.
  • kind: "network"The request could not reach ProxyRequest.
  • kind: "unexpected"The response could not be decoded or did not match the SDK contract.
Advanced variants
  • client.profile.getWithResponse(options): Promise<ApiResponse<ProfileGetResponse>>

    Returns response status, headers, ETag and idempotency metadata with the decoded data.

method

update()

Update the current profile

Updates the supplied profile fields and returns the latest account state. Fields omitted from the request are left unchanged.

Signature

Promiseclient.profile.update(options: ProfileUpdateOptions = {}): Promise<ProfileUpdateResponse>

Parameters

NameTypeRequirementDescription
ifMatchstringOptionalStrong ETag from the latest representation of this resource.
acceptLanguagestringOptionalPreferred language for human-readable API errors. Supported languages: en, ru, uk, de, it, fr, es, zh-hans, ja. Regional language tags and quality weights are accepted; unsupported or omitted values use English.
bodyPatchedProfileUpdateRequestOptional—

Example

const result = await client.profile.update({
body: {}
});

Returns

User

The request was accepted and the updated resource is returned.

typeUser43fields

Customer account with contact details, security settings, package data, referral information, and managed sub-users visible to the caller.

id
string
Required
—
username
string
Required
Value must contain only letters, numbers, and underscores. It must not start or end with an underscore.
email
string
Required
—
is_reseller
boolean
Optional
Reseller can create sub-users and manage their data.
is_marketer
boolean
Optional
Marketer can manage marketing campaigns and view analytics.
is_superuser
boolean
Optional
Designates that this user has all permissions without explicitly assigning them.
date_joined
string
Required
—
date_joined_ts
number
Required
Timestamp of when the user joined
first_name
string
Optional
—
last_name
string
Optional
—
balance
number
Optional
—
language
LanguageEnum
Optional
—
enumLanguageEnum0fields

* `en` - EN * `de` - DE * `fr` - FR * `it` - IT * `ru` - RU

No fields.

country
string
Optional
—
state
string
Optional
—
city
string
Optional
—
address
string
Optional
—
zip
string
Optional
—
company_name
string
Optional
—
company_address
string
Optional
—
company_city
string
Optional
—
company_postal_code
string
Optional
—
company_country
string
Optional
—
company_vat_number
string
Optional
—
allowed_ips
string[]
Required
List of IP addresses allowed for this user
blocked_domains
string[]
Required
List of domains blocked for this user
connection_limit
number
Optional
The maximum number of concurrent connections allowed for this package.
parent_id
string
Required
ID of the parent user (for sub-accounts)
sub_users
number
Required
Number of sub-users managed by this reseller
referrals
number
Required
Number of users referred by this user
referral_id
string
Optional
—
referral_code
string
Required
—
referral_data_earned
number
Required
—
referral_data_pending
number
Required
—
referral_balance_pending
number
Required
—
referral_balance_earned
number
Required
—
currency
UserCurrency
Required
Currency information for the user's transactions
typeUserCurrency2fields
code
string
Required
—
symbol
string
Required
—
coupons
CouponShort[]
Required
Available coupons for this user
typeCouponShort14fields
id
string
Optional
—
is_expired
boolean
Required
—
is_redeemed
boolean
Required
—
packages
PackageShort[]
Required
—
typePackageShort5fields
id
string
Optional
—
name
string
Required
Unique display name for this package shown to customers and in the admin. Residential Starter Business Pro
alias
string
Required
Lowercase alphanumeric identifier used internally for package resolution and proxy username routing. Cannot be changed without affecting active connections. residential01 bizpro
is_unlimited_data
boolean
Optional
When enabled, users on this package have no data cap. The proxy will not enforce any bandwidth limit.
targeting_options
TargetingOptions
Required
—
typeTargetingOptions25fields
package
string
Required
—
split_char
string
Required
—
value_char
string
Required
—
continent
string
Required
—
country
string
Required
—
region
string
Required
—
city
string
Required
—
asn
string
Required
—
isp
string
Required
—
username
string
Required
—
pool
string
Required
—
location
string
Required
—
location_format
string
Required
—
session
string
Required
—
session_mode_tag
string
Required
—
session_ttl
string
Required
—
session_ttl_format
number
Required
—
os
string
Required
—
os_combined
boolean
Required
—
os_split_char
string
Required
—
os_linux
string
Required
—
os_windows
string
Required
—
os_ios
string
Required
—
os_macos
string
Required
—
os_android
string
Required
—
created
string
Required
—
value
number
Required
Arbitrary coupon value
code
string
Required
Leaving this field empty will generate a random code.
is_multi_use
boolean
Optional
If true, coupon can be used multiple times.
is_available_to_one_time
boolean
Optional
If true, coupon can not be used for one-time package tiers.
type
CouponTypeEnum
Required
—
enumCouponTypeEnum0fields

* `free_data` - Free Data * `monetary` - Money * `percentage` - Percentage

No fields.

limit
number
Optional
Number of times coupon can be used
valid_until
string
Optional
Leave empty for coupons that never expire
marketer
string
Optional
The marketer who owns this coupon. Required if is_marketer is true.
user
string
Required
The user who created this coupon.
data
number
Optional
Present only when SITE_PACKAGE_BASED_AUTH is disabled.
data_spent
number
Optional
Present only when SITE_PACKAGE_BASED_AUTH is disabled.
data_updated
string
Optional
Present only when SITE_PACKAGE_BASED_AUTH is disabled.
proxy_password
string
Optional
Present only when SITE_PACKAGE_BASED_AUTH is disabled.
proxy_password_reset
string
Optional
Present only when SITE_PACKAGE_BASED_AUTH is disabled.
orders
Order[]
Optional
The user's package orders, including inactive orders. Each order contains its own data allowance, usage, ledgers, and proxy credentials. An empty list means the user has no orders.
typeOrder17fields
id
string
Optional
—
is_auto_renewal
boolean
Required
—
auto_renewal_percentage
number
Optional
When this percentage of the data allowance has been consumed, the order is automatically renewed if the user has sufficient balance. Set to 0 to disable auto-renewal. 80 → renew when 80% of data is used
auto_renewal_data
number
Optional
Amount of data in GB to add when auto-renewal is triggered. Set to 0 to use the package default.
package
PackageShort
Required
—
typePackageShort5fields
id
string
Optional
—
name
string
Required
Unique display name for this package shown to customers and in the admin. Residential Starter Business Pro
alias
string
Required
Lowercase alphanumeric identifier used internally for package resolution and proxy username routing. Cannot be changed without affecting active connections. residential01 bizpro
is_unlimited_data
boolean
Optional
When enabled, users on this package have no data cap. The proxy will not enforce any bandwidth limit.
targeting_options
TargetingOptions
Required
—
typeTargetingOptions25fields
package
string
Required
—
split_char
string
Required
—
value_char
string
Required
—
continent
string
Required
—
country
string
Required
—
region
string
Required
—
city
string
Required
—
asn
string
Required
—
isp
string
Required
—
username
string
Required
—
pool
string
Required
—
location
string
Required
—
location_format
string
Required
—
session
string
Required
—
session_mode_tag
string
Required
—
session_ttl
string
Required
—
session_ttl_format
number
Required
—
os
string
Required
—
os_combined
boolean
Required
—
os_split_char
string
Required
—
os_linux
string
Required
—
os_windows
string
Required
—
os_ios
string
Required
—
os_macos
string
Required
—
os_android
string
Required
—
proxy_password
string
Optional
Password used by the customer to authenticate proxy connections. Auto-generated by default — change only if a custom value is needed. Must be between 4 and 64 characters.
proxy_password_reset
string
Optional
Timestamp of the last proxy password change. Read-only — updated automatically whenever the password is rotated.
pools
string[]
Optional
Private proxy pools assigned to this order. Pools restrict which proxy IPs are available to this customer. Leave blank to use the full provider pool.
data
number
Optional
Total data allowance for this order in bytes. 1073741824 = 1 GiB 10737418240 = 10 GiB
data_remaining
number
Required
Integer bytes. Root order: sum of usable ledger balances, not data minus data_spent. Virtual child order: max(data - data_spent, 0), a personal quota that does not guarantee the parent still has usable data.
data_spent
number
Optional
Total bytes consumed from this order's data allowance so far. Updated in real time as the customer uses the proxy.
ledgers
DataLedger[]
Required
Usable, non-expired ledger balances for a purchased root order; empty for a virtual child order using its parent's pool. Not a complete history. Array position does not identify the active ledger or spending order.
typeDataLedger6fields

A purchased data bucket, not a complete transaction history. Finite purchases with an expiration have separate buckets. Compatible non-expiring top-ups and unlimited packages may reuse an existing bucket.

id
string
Required
—
data
number
Required
Total data allocated to this ledger entry in bytes. 1073741824 = 1 GiB 10737418240 = 10 GiB
data_remaining
number
Required
Bytes still available for consumption from this ledger entry. Decremented in FIFO order as the customer uses the proxy. When this reaches zero the entry is exhausted.
expires
string
Required
Date and time when this ledger entry expires and any remaining data is forfeited. Leave blank for entries that do not expire.
updated
string
Required
—
created
string
Required
—
latest_data_top_up
number
Optional
Amount of data added to this order in bytes during the most recent top-up.
latest_data_top_up_date
string
Optional
Timestamp of the most recent data top-up, set when an invoice is fulfilled.
data_updated
string
Required
—
updated
string
Required
—
created
string
Required
—

Throws

ApiError

Normalized API, transport, and response processing failure.

  • kind: "validation"The request arguments or business rules are invalid.
  • kind: "authentication"Authentication credentials are missing, expired, or invalid.
  • kind: "permission"The authenticated account cannot perform this operation.
  • kind: "precondition"A required resource precondition is no longer satisfied.
  • kind: "network"The request could not reach ProxyRequest.
  • kind: "unexpected"The response could not be decoded or did not match the SDK contract.
Advanced variants
  • client.profile.updateWithResponse(options): Promise<ApiResponse<ProfileUpdateResponse>>

    Returns response status, headers, ETag and idempotency metadata with the decoded data.

method

delete()

Delete the current account

Permanently deletes the authenticated customer account. Superusers and reseller sub-accounts cannot delete themselves with this operation.

Signature

Promiseclient.profile.delete(options: ProfileDeleteOptions = {}): Promise<ProfileDeleteResponse>

Parameters

NameTypeRequirementDescription
ifMatchstringOptionalStrong ETag from the latest representation of this resource.
acceptLanguagestringOptionalPreferred language for human-readable API errors. Supported languages: en, ru, uk, de, it, fr, es, zh-hans, ja. Regional language tags and quality weights are accepted; unsupported or omitted values use English.

Example

const result = await client.profile.delete();

Returns

void

No response body

Throws

ApiError

Normalized API, transport, and response processing failure.

  • kind: "validation"The request arguments or business rules are invalid.
  • kind: "authentication"Authentication credentials are missing, expired, or invalid.
  • kind: "permission"The authenticated account cannot perform this operation.
  • kind: "precondition"A required resource precondition is no longer satisfied.
  • kind: "network"The request could not reach ProxyRequest.
  • kind: "unexpected"The response could not be decoded or did not match the SDK contract.
Advanced variants
  • client.profile.deleteWithResponse(options): Promise<ApiResponse<ProfileDeleteResponse>>

    Returns response status, headers, ETag and idempotency metadata with the decoded data.

method

confirmTwoFactor()

Confirm two-factor authentication

Activates the pending authenticator after verifying its code and revokes previous JWTs.

Signature

Promiseclient.profile.confirmTwoFactor(options: ProfileConfirmTwoFactorOptions): Promise<ProfileConfirmTwoFactorResponse>

Parameters

NameTypeRequirementDescription
acceptLanguagestringOptionalPreferred language for human-readable API errors. Supported languages: en, ru, uk, de, it, fr, es, zh-hans, ja. Regional language tags and quality weights are accepted; unsupported or omitted values use English.
bodyTwoFactorConfirmRequestRequired—

Example

const result = await client.profile.confirmTwoFactor({
body: {
"code": "{code}"
}
});

Returns

EnabledResponse

The operation completed successfully.

typeEnabledResponse1field
enabled
boolean
Required
—

Throws

ApiError

Normalized API, transport, and response processing failure.

  • kind: "validation"The request arguments or business rules are invalid.
  • kind: "authentication"Authentication credentials are missing, expired, or invalid.
  • kind: "permission"The authenticated account cannot perform this operation.
  • kind: "network"The request could not reach ProxyRequest.
  • kind: "unexpected"The response could not be decoded or did not match the SDK contract.
Advanced variants
  • client.profile.confirmTwoFactorWithResponse(options): Promise<ApiResponse<ProfileConfirmTwoFactorResponse>>

    Returns response status, headers, ETag and idempotency metadata with the decoded data.

method

disableTwoFactor()

Disable two-factor authentication

Requires the primary factor and current authenticator code, then revokes previous JWTs.

Signature

Promiseclient.profile.disableTwoFactor(options: ProfileDisableTwoFactorOptions): Promise<ProfileDisableTwoFactorResponse>

Parameters

NameTypeRequirementDescription
acceptLanguagestringOptionalPreferred language for human-readable API errors. Supported languages: en, ru, uk, de, it, fr, es, zh-hans, ja. Regional language tags and quality weights are accepted; unsupported or omitted values use English.
bodyTwoFactorDisableRequestRequired—

Example

const result = await client.profile.disableTwoFactor({
body: {
"code": "{code}"
}
});

Returns

EnabledResponse

The operation completed successfully.

typeEnabledResponse1field
enabled
boolean
Required
—

Throws

ApiError

Normalized API, transport, and response processing failure.

  • kind: "validation"The request arguments or business rules are invalid.
  • kind: "authentication"Authentication credentials are missing, expired, or invalid.
  • kind: "permission"The authenticated account cannot perform this operation.
  • kind: "network"The request could not reach ProxyRequest.
  • kind: "unexpected"The response could not be decoded or did not match the SDK contract.
Advanced variants
  • client.profile.disableTwoFactorWithResponse(options): Promise<ApiResponse<ProfileDisableTwoFactorResponse>>

    Returns response status, headers, ETag and idempotency metadata with the decoded data.

method

setupTwoFactor()

Prepare two-factor authentication

Confirms the primary factor and prepares a pending secret without disabling current protection.

Signature

Promiseclient.profile.setupTwoFactor(options: ProfileSetupTwoFactorOptions = {}): Promise<ProfileSetupTwoFactorResponse>

Parameters

NameTypeRequirementDescription
acceptLanguagestringOptionalPreferred language for human-readable API errors. Supported languages: en, ru, uk, de, it, fr, es, zh-hans, ja. Regional language tags and quality weights are accepted; unsupported or omitted values use English.
bodyTwoFactorSetupRequestRequestOptional—

Example

const result = await client.profile.setupTwoFactor({
body: {}
});

Returns

TwoFactorSetupResponse

The operation completed successfully.

typeTwoFactorSetupResponse3fields
secret
string
Required
—
otpauth_url
string
Required
—
qr_png_base64
string
Optional
—

Throws

ApiError

Normalized API, transport, and response processing failure.

  • kind: "validation"The request arguments or business rules are invalid.
  • kind: "authentication"Authentication credentials are missing, expired, or invalid.
  • kind: "permission"The authenticated account cannot perform this operation.
  • kind: "network"The request could not reach ProxyRequest.
  • kind: "unexpected"The response could not be decoded or did not match the SDK contract.
Advanced variants
  • client.profile.setupTwoFactorWithResponse(options): Promise<ApiResponse<ProfileSetupTwoFactorResponse>>

    Returns response status, headers, ETag and idempotency metadata with the decoded data.

method

getTwoFactorStatus()

Get two-factor status

Returns whether TOTP two-factor authentication is enabled for the authenticated account.

Signature

Promiseclient.profile.getTwoFactorStatus(options: ProfileGetTwoFactorStatusOptions = {}): Promise<ProfileGetTwoFactorStatusResponse>

Parameters

NameTypeRequirementDescription
acceptLanguagestringOptionalPreferred language for human-readable API errors. Supported languages: en, ru, uk, de, it, fr, es, zh-hans, ja. Regional language tags and quality weights are accepted; unsupported or omitted values use English.

Example

const result = await client.profile.getTwoFactorStatus();

Returns

EnabledResponse

The operation completed successfully.

typeEnabledResponse1field
enabled
boolean
Required
—

Throws

ApiError

Normalized API, transport, and response processing failure.

  • kind: "validation"The request arguments or business rules are invalid.
  • kind: "authentication"Authentication credentials are missing, expired, or invalid.
  • kind: "permission"The authenticated account cannot perform this operation.
  • kind: "network"The request could not reach ProxyRequest.
  • kind: "unexpected"The response could not be decoded or did not match the SDK contract.
Advanced variants
  • client.profile.getTwoFactorStatusWithResponse(options): Promise<ApiResponse<ProfileGetTwoFactorStatusResponse>>

    Returns response status, headers, ETag and idempotency metadata with the decoded data.

method

changePassword()

Change the account password

Verifies the current password, applies the new password, and keeps the current authenticated session active.

Signature

Promiseclient.profile.changePassword(options: ProfileChangePasswordOptions): Promise<ProfileChangePasswordResponse>

Parameters

NameTypeRequirementDescription
acceptLanguagestringOptionalPreferred language for human-readable API errors. Supported languages: en, ru, uk, de, it, fr, es, zh-hans, ja. Regional language tags and quality weights are accepted; unsupported or omitted values use English.
bodyChangePasswordRequestRequired—

Example

const result = await client.profile.changePassword({
body: {
"old_password": "Correct-Horse-Battery-Staple-42",
"new_password1": "Correct-Horse-Battery-Staple-42",
"new_password2": "Correct-Horse-Battery-Staple-42"
}
});

Returns

MessageResponse

The operation completed successfully.

typeMessageResponse1field
detail
string
Required
—

Throws

ApiError

Normalized API, transport, and response processing failure.

  • kind: "validation"The request arguments or business rules are invalid.
  • kind: "authentication"Authentication credentials are missing, expired, or invalid.
  • kind: "permission"The authenticated account cannot perform this operation.
  • kind: "network"The request could not reach ProxyRequest.
  • kind: "unexpected"The response could not be decoded or did not match the SDK contract.
Advanced variants
  • client.profile.changePasswordWithResponse(options): Promise<ApiResponse<ProfileChangePasswordResponse>>

    Returns response status, headers, ETag and idempotency metadata with the decoded data.