Prerequisites
Before you begin:- Create or sign in to your Circle Developer Console account.
- Generate an API Key.
- Complete the Authentication Methods configurations before you set up the sample app.
If you want to test in the iOS or Android environment, you can check the
GitHub repository for iOS sample
app and Android
sample app.
Step 1. Configure the sample app
- Select the Email tab.
- Obtain an App ID. Either:
- From the Circle Developer Console, navigate to Wallets > User Controlled > Configurator and copy App ID.
- Send a
GETrequest to the/config/entityendpoint and copy theappIdfrom the response body.
- Add the App ID to the sample app.
The sample app generates and pre-populates the device ID. During actual
implementation, you must retrieve it by calling the SDK method
getDeviceId.Step 2. Configure SMTP settings and customize one-time passcode (OTP) email
- From the Circle Developer Console, navigate to Wallets > User Controlled > Configurator.
- Select Authentication Methods > Email.
- Enter your SMTP data.
- Customize your OTP email content:
- Enter a From email address and Subject for the email’s subject line.
- Modify the content in the Email Template.
Step 3. Perform email login
-
Include your API key,
deviceId, and email address in aPOSTrequest to the/users/email/tokenendpoint.cURL -
Copy
deviceToken,deviceEncryptionKey, andotpTokenfrom the response and enter them into the sample app.Node.js -
On the sample app, select Login with Email. This takes you through the
OTP email flow:
- An email containing an OTP is sent to the email address specified in your
request to
/users/email/token. - The sample app prompts you with a UI to enter the OTP to verify identity,
which corresponds to the SDK method
verifyOTP.
- An email containing an OTP is sent to the email address specified in your
request to
- Once the OTP is verified, you are redirected back to the main page of the sample app. The “Execute Challenge” section is now visible.

-
Select Execute Challenge.
BothencryptionKeyanduserTokenare pre-populated since these parameters are required for the next step, which is to initialize the user.
The sample app pre-populates the
encryptionKey and userToken for you.
During the actual development, the client-side SDK returns userId,
userToken, encryptionKey, and refreshToken to you.Step 4. Initialize user and acquire challenge ID
- Include
userTokencopied from the previous step in aPOSTrequest to the/user/initializeendpoint. - Copy
challengeIdfrom the response and enter it into the sample app.
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
Step 5. Create wallet
- Paste the Challenge ID copied from the previous step into the sample app, and select Execute.
- An “Execute Successful” message is displayed on the sample app. A web3 wallet is created for you users!
To execute a challenge during actual implementation, you must call the Web SDK
API
execute with the challengeId returned from Circle. Also, make sure you
have an active userToken , encryptionKey for any challenge executions.Step 6. Check user and wallet status
Once you have created a wallet in the sample app, you can check the user and wallet status. To check the user’s account status:- Include
userTokenin aGETrequest to the/userendpoint to retrieve the status of the user’s account.
Response Body
- Include
userTokenin aGETrequest to the/walletsendpoint to retrieve the user’s new wallet.
Amoy sample response
Response Body
Solana sample response
Response Body
- From the Wallets section on the sidebar, select User Controlled > Users.
- Select your user from the row. The wallet address is displayed.