Renew Account

Estimated reading: 2 minutes

Renewing VPN accounts via API is an essential feature for managing subscription-based VPN services. This functionality allows users or administrators to extend the validity of a VPN account seamlessly, ensuring continuous access to VPN resources. This article provides a concise technical overview of how to implement VPN account renewal through API calls.

Renew

Use this API to renew and account period and package with Preferences.

Returns JSON object that contains the VPN user name and renew day.

Note: The account can only be renewed when 10 days or fewer remain before expiration.

  • URL: <base url>/vam/v2/renew
  • Request Method: POST

Payload

KeyTypePass inDescription
X-AccessToken*StringHeaderaccessToken retrieved from Get Access Token endpoint
vpnUsername*StringBodyVPN Username
period*IntegerBodyPeriod of account. It can be maximum 3700
preferencesStringBodypreferences in Json format

Response

KeyTypeDescription
headerJSONJSON object that describes return code and message
bodyJSONJSON object that return username and renew days

Possible API error codes

CodeMessageDescription
11001The provided username is not valid for this resellerThe provided username is not recognized as valid for the associated reseller.
100010You can renew account when 10 or less days are remainingThe account can only be renewed when 10 or fewer days are left until expiration.
100033This Dedicated User IP has been assigned to another userThe Dedicated IP has been assigned to a different user.

Sample Response

{
  "header": {
    "response_code": 1,
    "message": "VPN account has been renewed successfully"
  },
  "body": {
    "vpnUsername": "xxxxxxxx",
    "renewForDays": "xxxxxxxx",
  }
}
Share this Doc

Renew Account

Or copy link

On This Page