Skip to main content
A recovery code will be sent to the registered email address associated with the wallet.

Prerequisites

  • Valid wallet username in the format <walletUsername>@<appId>
  • Access to the email address registered with the wallet

Request

curl -X POST "https://api.g2cplatform.com/v2/auth/wallet/recover" \
  -H "Content-Type: application/json" \
  -d '{
    "username": "john@myapp123"
  }'

Request Body

FieldTypeRequiredDescription
usernamestringYesUsername in format <walletUsername>@<appId>

Response

{
  "message": "Recovery email sent successfully",
  "timestamp": "2024-03-15T10:30:00Z"
}

Response Fields

FieldTypeDescription
messagestringConfirmation message about the recovery email
timestampstringISO 8601 timestamp of the response

Error Responses

Status CodeDescription
400Invalid request format or missing required fields
404Wallet not found with the provided username
500Internal server error

Usage Notes

  • The recovery email contains a unique recovery code with limited validity
  • Use the recovery code with the reset password endpoint to set a new password
  • Recovery codes typically expire within 24 hours for security
  • Only one active recovery code per wallet at a time
  • The wallet must have a registered email address to receive the recovery code