Circle Wallets provide a comprehensive developer solution to storing, sending, and spending Web3 digital currencies and NFTs. You or your users can manage asset infrastructure. Circle provides a one-stop-shop experience with all the tools and services to handle the complex parts, including security, transaction monitoring, account recovery flows, and more. This guide outlines how users can regain access to their account using their pre-set security questions in the event that they forget their original PIN code. Users should be aware that the answers to their security questions are their responsibility to remember. No additional parties can help users regain access to a user-controlled wallet if their PIN code is lost and they cannot remember the answers to their security questions.Documentation Index
Fetch the complete documentation index at: https://developers.circle.com/llms.txt
Use this file to discover all available pages before exploring further.
1. Run Sample App
Once you have one of the web, iOS, or Android sample applications set up locally, you will then:- Run the sample app and simulator.
- Obtain your App ID. This can be done by one of two options
- Access the developer console and navigate to the configurator within user-controlled wallets. From there, copy the App ID.
-
Make an API request to
GET /config/entityand copy the App ID from the response body.
- Add the App ID to the sample app.
2. Acquire Session Token
Next, you will need to acquire a session token. Make a request to thePOST /users/token
using the previously created userId in Step 1. The userToken is a 60-minute
session token used to initiate requests requiring a user challenge (PIN code
entry). After 60 minutes, the session expires, and a new userToken must be
generated via the same endpoint.
From this response, you will acquire the encryptionKey and userToken which
you should provide in the respective fields in the sample app. Additionally, you
will use the userToken in Step 2.
Response body
3. Initialize Account Recovery and Acquire a Challenge ID
Make a request toPOST /user/pin/restore
using the userToken returned from Step 1. This call returns a challengeId,
which is used with the Circle Programmable Wallet SDK to have the user reset
their PIN code.
JSON
4. Recover Account in the Sample App
Using the sample application, enter theuserToken and secretKey returned
from Step 1. Enter the challengeId returned from Step 2.
At this point, you should be ready to execute the account recovery workflow
through the Circle Programmable Wallet SDK. Once you’ve entered the required
fields indicated in Step 3, click Execute to continue.


5. Check the Challenge Status
Make a request toGET /user/challenges/{id}
using the challengeId received from Step 2 to retrieve the status of the
challenge. Additionally, Circle sends a notification to a
subscribed endpoint once the account recovery
process is complete. For a full list of possible statuses, see the
Asynchronous States and Statuses guide.
Response Body