Updated on 2024-07-29 GMT+08:00

Resetting the Password of a VPN User

Function

This API is used to reset the password of a specified VPN user.

Calling Method

For details, see Calling APIs.

URI

POST /v5/{project_id}/p2c-vpn-gateways/vpn-servers/{vpn_server_id}/users/{user_id}/reset-password

Table 1 Parameter description

Parameter

Type

Mandatory

Description

project_id

String

Yes

Specifies a project ID. You can obtain the project ID by referring to Obtaining the Project ID.

vpn_server_id

String

Yes

Specifies the ID of a VPN server.

user_id

String

Yes

Specifies the ID of a VPN user.

Request

  • Request parameters
    Table 2 Request parameters

    Parameter

    Type

    Mandatory

    Description

    new_password

    String

    Yes

    • Specifies a new password for the user.
    • Constraints:
      • The value contains 8 to 32 characters.
      • The value must contain at least two types of the following characters: uppercase letters, lowercase letters, digits, and the following special characters: `~!@#$%^&*()-_=+\|[{}];:'",<.>/? and spaces.
      • The password cannot be the username or the reverse of the username.
      • The new password must be different from the latest five old passwords.
  • Example request
    POST  https://{Endpoint}/v5/{project_id}/p2c-vpn-gateways/vpn-servers/{vpn_server_id}/users/{user_id}/reset-password
    
    {
      "new_password": "stringst-new"
    }

Response

  • Response parameters

    Returned status code 200: successful operation

Table 3 Parameters in the response body

Parameter

Type

Description

request_id

String

Specifies a request ID.

  • Example response
    {
      "request_id": "c63d850876bcddbdfbd11776cce57914"
    }

Status Codes

For details, see Status Codes.