Initiate a request to cancel an account
This document is automatically generated based on https://github.com/authing/authing-docs-factory based on the https://api-explorer.genauth.ai V3 API, and is consistent with the API parameters and return results. If the document description is incorrect, please refer to the V3 API.
When a user wants to cancel an account, he needs to provide the corresponding credentials. Currently, three verification methods are supported: Use email verification code, Use mobile verification code, and Use password.
Method name
AuthenticationClient.verify_delete_account_request
Request parameters
| Name | Type | Required | Default value | Description | Sample value |
|---|---|---|---|---|---|
| verifyMethod | string | yes | - | Account deregistration verification method: - PHONE_PASSCODE: Use phone number verification code method for verification. - EMAIL_PASSCODE: Use email verification code method for verification. - PASSWORD: If the user has neither a phone number nor an email bound, the password can be used as the verification method. | PHONE_PASSCODE |
| phonePassCodePayload | <a DeleteAccountByPhonePassCodeDto | No | - | Data verified by phone number verification code | |
| emailPassCodePayload | <a DeleteAccountByEmailPassCodeDto | No | - | Data verified by email verification code | |
| passwordPayload | <a DeleteAccountByPasswordDto | No | - | Data verified by password |
Request response
Type: VerifyDeleteAccountRequestRespDto
| Name | Type | Description |
|---|---|---|
| statusCode | number | Business status code, which can be used to determine whether the operation is successful. 200 means success. |
| message | string | Description |
| apiCode | number | Segmented error code, which can be used to get the specific error type (successful request does not return). For a detailed list of error codes, please see: API Code List |
| requestId | string | Request ID. Returned when the request fails. |
| data | <a VerifyDeleteAccountRequestDataDto | Response data |
Sample result:
json
{
"statusCode": 200,
"message": "Operation successful",
"requestId": "934108e5-9fbf-4d24-8da1-c330328abd6c",
"data": {
"deleteAccountToken": "xxxx",
"tokenExpiresIn": 60
}
}Data structure
DeleteAccountByPhonePassCodeDto
| Name | Type | Is it required? | Description | Sample value |
|---|---|---|---|---|
| phoneNumber | string | Yes | The phone number bound to this account, without the area code. If it is a foreign phone number, please specify the area code in the phoneCountryCode parameter. | 188xxxx8888 |
| passCode | string | Yes | SMS verification code, which can only be used once and is valid for one minute. You need to obtain it through the Send SMS interface. | 123456 |
| phoneCountryCode | string | No | Mobile phone area code | +86 |
DeleteAccountByEmailPassCodeDto
| Name | Type | Is it required? | Description | Sample value |
|---|---|---|---|---|
| string | No | Email address bound to this account, case insensitive. | ||
| passCode | string | Yes | Email verification code. An SMS verification code can only be used once. The default validity period is 5 minutes. You need to obtain it through the Send Email interface. |
DeleteAccountByPasswordDto
| Name | Type | Is it required? | Description | Sample value |
|---|---|---|---|---|
| password | string | Yes | User password | |
| passwordEncryptType | string | No | Password encryption type, supports encryption using RSA256 and SM2 algorithms. The default is none, which means no encryption. - none: Do not encrypt the password and use plain text for transmission. - rsa: Use the RSA256 algorithm to encrypt the password. You need to use the RSA public key of the GenAuth service for encryption. Please read the Introduction section to learn how to obtain the RSA256 public key of the GenAuth service. - sm2: Use the National Secret SM2 Algorithm to encrypt the password. You need to use the SM2 public key of the GenAuth service for encryption. Please read the Introduction section to learn how to obtain the SM2 public key of the GenAuth service. | sm2 |
VerifyDeleteAccountRequestDataDto
| Name | Type | Required | Description | Sample value |
|---|---|---|---|---|
| deleteAccountToken | string | Yes | Temporary Token used to cancel an account. You need to call the CancelAccount API to perform the actual account cancellation operation. | xxxx |
| tokenExpiresIn | number | Yes | Token validity period. The default value is 60 seconds. | 60 |