Extend Expiry

Estimated reading: 2 minutes

Extending VPN accounts via API is a crucial functionality for managing user subscriptions and ensuring uninterrupted VPN access. This process allows administrators and users to extend the validity of their VPN accounts programmatically, facilitating seamless access without manual intervention. This article provides a technical overview of implementing VPN account extension through API calls.

Extend Expiry

Use this API to extend expiry of a VPN user for further use.

Returns a JSON object that contains the VPN username and updated expiration date.

  • URL: <base url>/vam/v2/extend
  • Request Method: PUT

Payload

KeyTypePass inDescription
X-AccessToken*StringHeader accessToken retrieved from Get Access Token endpoint
vpnUsername*StringBodyVPN Username
extensionDate*StringBodyExtension date to be provided (DD-MM-YYYY)
(*) Required Parameter

Response

KeyTypeDescription
headerJSONJSON object that describes return code and message.
bodyJSONJSON object that return username and user new expire date.

Possible API error codes

CodeMessageDescription
1601There is some problem in extending vpn accountAn error occurred while attempting to extend the VPN account.
11001The extension date does not match the format (DD-MM-YYYY).The provided extension date does not match the required format (DD-MM-YYYY).
11001The provided username is not valid for this resellerThe provided username is not recognized as valid for the associated reseller.
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 extended successfully"
  },
  "body": {
    "vpnUsername": "xxxxx",
    "extendedForDays": "xxxxxx"
  }
}
Share this Doc

Extend Expiry

Or copy link

On This Page