Prerequisites
- Create a developer account and acquire an API key in the console.
- Install the Developer Services SDKs, which is only available for Node.js. (optional)
- Set up one of the web, iOS, or Android sample applications locally.
1. Configure and Run the 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.
App IDAKA Application ID is a unique identifier assigned to your application. It
serves as a key that allows you to configure and manage various settings
specific to your User-Controlled Wallet integration. The App ID is essential for
identifying your application and enabling communication with the Circle Platform
APIs.

2. Create a User
Make a request toPOST /users to
create a userId. This represents the user’s account and all associated
wallets, assets, and transactions. The userId is recommended to be in the UUID
format.
We recommend that you maintain a mapping to associate the end-user profile
usernames with the
userId provided to our service/end-point. You can use a
local database to maintain this mapping.Response Body
3. Acquire a Session Token
Next, you will need to acquire a session token. To do this, you will make a request to thePOST /users/token
using the previously created userId in Step 2. The userToken is a 60-minute
session token, which is used to initiate requests that require a user
(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 sample app fields. Additionally, you will
use the userToken in Step 4.
Response body
4. Initialize the User’s Account and Acquire the Challenge ID
You have two options to initialize your user’s account: For this guide, we will use Option 1 to create a user and a wallet simultaneously.| Option | API endpoint | Result |
|---|---|---|
| 1 | POST /user/initialize: Initialize a user account and create a wallet | This call generates wallets for the specified blockchains at the time of account creation. Use this method if you know which blockchain the wallet will be created on. |
| 2 | POST /user/pin: Initialize the user account | This call generates an account without creating a wallet. Use this method if you are unsure when creating an account on which blockchain the wallet will be created on. |
POST /user/initialize
using the userToken returned from Step 3. This call returns a
ID, which is used with the Circle Programmable
Wallet SDK to have the user set their PIN code and security questions.
Make sure to provide a Testnet blockchain such as ETH-SEPOLIA, MATIC-AMOY,
and AVAX-FUJI.
Amoy example
The following code samples show how to create an SCA wallet on Amoy and the response.Response Body
Solana example
The following code samples show how to create an EOA wallet on Solana and the response.Response Body
5. Create a Wallet in the Sample App
At this point, you should be ready to execute your first request through the sample app. Once you’ve entered the required fields indicated in Step 4, click Execute to continue. The sample application takes you through the end user initialization process, which includes setting up the user’s PIN code and security questions and having the user confirm their configuration.
6. Check User Status
Once you have completed all the steps in the sample app, you can then check the user status by making a request toGET /user
providing the userToken to retrieve the status of the user’s account.
To understand the current state of the user, inspect the following values:
-
PIN Status: This parameter indicates whether the end-user has
successfully set a 6-digit PIN. If the user has set the PIN successfully, the
pinStatusvalue will beenabled. -
Security Question Status: This parameter provides information about the
user’s recovery method status, specifically related to the defined security
questions. If the end-user has successfully established a recovery method by
defining their security questions, the
securityQuestionStatuswill be set toenabled.
Additional information provided will include the number of failed attempts for
both the
pinStatus and the security questions. If the end-user enters an
incorrect PIN or security answers more than three times, the pin entry or
recovery method will be locked, and they will need to wait 30 minutes for it
to be unlocked.Response Body
7. Check Wallet Status
Additionally, you can make an API request toGET /wallets
using the userToken to see the user’s newly created wallets.
Amoy sample response
Response Body
Solana sample response
Response Body