Obtains a random password string.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes GetRandomPassword

The operation that you want to perform. Set the value to GetRandomPassword.

PasswordLength String No 32

The number of bytes that the password to be generated contains.

Valid values: 8 to 128

Default value: 32

ExcludeCharacters String No ABCabc

The characters that are not included in the password to be generated.

Valid characters: 0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!\"#$%&'()*+,-./:;<=>?@[\]^_{|}~. This parameter is empty by default.

ExcludeLowercase String No false

Specifies whether to exclude lowercase letters.

Valid values:

  • true
  • false

Default value: false

ExcludeUppercase String No false

Specifies whether to exclude uppercase letters.

Valid values:

  • true
  • false

Default value: false

ExcludeNumbers String No false

Specifies whether to exclude digits.

Valid values:

  • true
  • false

Default value: false

ExcludePunctuation String No false

Specifies whether to exclude special characters.

Valid values:

  • true
  • false

Default value:false

RequireEachIncludedType String No true

Specifies whether to include all the preceding character types.

Valid values:

  • true
  • false

Default value: false

Response parameters

Parameter Type Example Description
RandomPassword String IxGn>NMmNB(y?iZ<Yc,_H/{2GC'Uk.Hl

The generated random password.

RequestId String 6b0cbe25-5e33-467e-972e-7a83c6c97604

The ID of the request.

Examples

Sample requests

http(s)://[Endpoint]/?Action=GetRandomPassword
&<Common request parameters>

Sample success responses

XML format

<RequestId>6b0cbe25-5e33-467e-972e-7a83c6c97604</RequestId>
<RandomPassword>IxGn&gt;NMmNB(y?iZ&lt;Yc,_H/{2GC'Uk.Hl</RandomPassword>

JSON format

{"RequestId":"6b0cbe25-5e33-467e-972e-7a83c6c97604","RandomPassword":"IxGn>NMmNB(y?iZ<Yc,_H/{2GC'Uk.Hl"}

Error codes

For a list of error codes, visit the API Error Center.