@@ -20,191 +20,104 @@ From your backend, you can list all your users and fetch the details of any user
2020 <TabsList >
2121 <TabsTrigger value = " single" >Single User</TabsTrigger >
2222 <TabsTrigger value = " all" >All Users</TabsTrigger >
23+ <TabsTrigger value = " create" >Create User</TabsTrigger >
2324 </TabsList >
2425
2526<TabsContent value = " single" >
2627
27- ### Endpoint
28+ ## Get Single User
2829
29- ` GET ` request to the following endpoint:
30-
31- ``` http
32- 33- Host: api.thirdweb.com
34- x-secret-key: <your-secret-key>
35- ```
36-
37- <OpenApiEndpoint path = " /v1/wallets/user" method = " GET" />
30+ Fetch details for a specific user by email, phone, wallet address, or user ID.
3831
3932### Query Parameters
4033
41- You can then query by different user identifiers:
34+ You can query by any of these user identifiers:
4235
43- - ` address ` : The user's wallet address that thirdweb has generated for them
36+ - ` address ` : The user's wallet address that thirdweb generated
4437- ` email ` : The user's email address
4538- ` phone ` : The user's phone number
46- - ` externalWalletAddress ` : The user's wallet address that used to login via SIWE
39+ - ` externalWalletAddress ` : The user's external wallet address (SIWE login)
4740- ` id ` : The user's ID (for custom auth)
4841
4942### Authentication
5043
51- You need to include the following headers:
52-
44+ Required headers:
5345- ` x-secret-key ` : Your secret key for authentication
5446- ` x-ecosystem-id ` (optional): Your ecosystem ID
5547- ` x-ecosystem-partner-id ` (optional): Your ecosystem partner ID
5648
57- ### Example Requests
58-
59- Here's an example curl command to fetch user details by email:
60-
61- ``` bash
49+ ### Example
6250
63- curl -X GET
' https://api.thirdweb.com/v1/wallets/[email protected] ' \
64- -H ' x-secret-key: YOUR_SECRET_KEY'
65-
66- ```
67-
68- Here's an example curl command to fetch user details by address:
51+ <OpenApiEndpoint path = " /v1/wallets/user" method = " GET" />
6952
70- ``` bash
71- curl -X GET ' https://api.thirdweb.com/v1/wallets/user?address=0x123456789abcdef' \
72- -H ' x-secret-key: YOUR_SECRET_KEY'
73- ```
53+ For ecosystem wallets, include the ecosystem headers in your requests.
7454
75- Here's an example curl command to fetch the user details for an ecosystem owner:
55+ </ TabsContent >
7656
77- ``` bash
78- curl -X GET ' https://api.thirdweb.com/v1/wallets/user?address=0x123456789abcdef' \
79- -H ' x-secret-key: YOUR_SECRET_KEY' \
80- -H ' x-ecosystem-id: ecosystem.YOUR_ECOSYSTEM_ID' \
81- -H ' x-ecosystem-partner-id: YOUR_PARTNER_ID'
82- ```
57+ <TabsContent value = " all" >
8358
84- In both examples, replace ` YOUR_SECRET_KEY ` with your actual ThirdWeb Client Secret.
59+ ## Get All Users
8560
86- Replace ` YOUR_ECOSYSTEM_ID ` and ` YOUR_PARTNER_ID ` with your actual ecosystem ID and partner ID respectively. The partner ID can be one you set up for yourself as the ecosystem owner .
61+ List all users in your in-app or ecosystem wallet with pagination support .
8762
88- ### Response Format
63+ ### Query Parameters
8964
90- The API returns a JSON array with the following structure for each user:
65+ - ` page ` (optional): Page number for pagination
66+ - ` limit ` (optional): Maximum users per request (default: 50)
9167
92- ``` json
93- {
94- "result" : {
95- "pagination" : {
96- "hasMore" : false ,
97- "limit" : 50 ,
98- "page" : 1
99- },
100- "wallets" : [
101- {
102- "address" : " 0x3aA70e68BBA8BC922a75d07388e368892c15c9Da" ,
103- "createdAt" : " 2025-07-21T22:58:12.834Z" ,
104- "profiles" : [
105- {
106- "id" : " 107302390467834615186" ,
107- "name" : " Richard Hendricks" ,
108- "type" : " google" ,
109- 110- "picture" : " https://lh3.googleusercontent.com/a/ACg8ocKC1D6ezzzaZxxUk4qtK_HCwVwpNamVopazXwklGBwuuHeSf_c=s96-c" ,
111- "givenName" : " Richard" ,
112- "emailVerified" : true
113- }
114- ]
115- }
116- ]
117- }
118- }
119- ```
68+ ### Authentication
12069
121- For more information, [ view the full reference] ( https://api.thirdweb.com/reference#tag/wallets/get/v1/wallets/user )
70+ Required headers:
71+ - ` x-secret-key ` : Your secret key for authentication
72+ - ` x-ecosystem-id ` (optional): Your ecosystem ID
73+ - ` x-ecosystem-partner-id ` (optional): Your ecosystem partner ID
12274
123- ### Convenience Methods
75+ <Callout variant = " info" title = " Ecosystem Users" >
76+ For ecosystem wallets, the secret key must be from the same account as the ecosystem owner.
77+ </Callout >
12478
125- If you are using the thirdweb SDK, you can use the ` getUser ` method to retrieve user details.
79+ ### Example
12680
127- <Stack >
128- <ArticleIconCard
129- title = " getUser"
130- icon = { TypeScriptIcon }
131- description = " Get user details from your backend for thirdweb wallets in TypeScript"
132- href = " /references/typescript/v5/getUser"
133- />
134- </Stack >
81+ <OpenApiEndpoint path = " /v1/wallets/users" method = " GET" />
13582
13683</TabsContent >
13784
138- <TabsContent value = " all " >
85+ <TabsContent value = " create " >
13986
140- ### Endpoint
87+ ## Create User Wallet (Pregeneration)
14188
142- ` GET ` request to the following endpoint:
89+ Pregenerate a user wallet before authentication. This creates a wallet in advance that can be claimed later when the user authenticates.
14390
144- ``` http
145- GET /v1/wallets/users
146- Host: api.thirdweb.com
147- x-secret-key: <your-secret-key>
148- ```
91+ ### Use Cases
14992
150- ### Query Parameters
151-
152- - ` page ` (optional): The page number to fetch (for pagination)
153- - ` limit ` (optional): Maximum number of users to return per request (defaults to 50)
93+ - Create wallets based on known email addresses or user IDs
94+ - Pre-fund wallets with tokens or NFTs before users claim them
95+ - Enable smoother onboarding experiences
15496
15597### Authentication
15698
157- You need to include the following headers:
158-
99+ Required headers:
159100- ` x-secret-key ` : Your secret key for authentication
160101- ` x-ecosystem-id ` (optional): Your ecosystem ID
161102- ` x-ecosystem-partner-id ` (optional): Your ecosystem partner ID
162103
163- <Callout variant = " info" title = " Getting ecosystem users" >
164- For ecosystem wallets, the secret key have to be from the same account as the
165- ecosystem owner.
166- </Callout >
104+ ### Example
167105
168- ### Example Requests
169-
170- Here's an example curl command to fetch all users:
171-
172- ``` bash
173- curl -X GET ' https://api.thirdweb.com/v1/wallets/users?page=2&limit=100' \
174- -H ' x-secret-key: YOUR_SECRET_KEY' \
175- -H ' Content-Type: application/json'
176- ```
177-
178- ### Response Format
179-
180- A successful API call returns an array of user objects in the following format:
181-
182- ``` json
183- {
184- "result" : {
185- "pagination" : {
186- "hasMore" : false ,
187- "limit" : 50 ,
188- "page" : 1
189- },
190- "wallets" : [
191- {
192- "address" : " 0x3aA70e68BBA8BC922a75d07388e368892c15c9Da" ,
193- "createdAt" : " 2025-07-21T22:58:12.834Z" ,
194- "profiles" : [
195- {
196- "id" : " 107302390467834615186" ,
197- "name" : " Richard Hendricks" ,
198- "type" : " google" ,
199- 200- "picture" : " https://lh3.googleusercontent.com/a/ACg8ocKC1D6ezzzaZxxUk4qtK_HCwVwpNamVopazXwklGBwuuHeSf_c=s96-c" ,
201- "givenName" : " Richard" ,
202- "emailVerified" : true
203- }]
204- },
205- ]
206- }
207- ```
106+ <OpenApiEndpoint path = " /v1/wallets/user" method = " POST" />
208107
209108</TabsContent >
109+
210110</Tabs >
111+
112+ ## SDK Integration
113+
114+ If you're using the thirdweb SDK, you can use the ` getUser ` method for easier integration:
115+
116+ <Stack >
117+ <ArticleIconCard
118+ title = " getUser"
119+ icon = { TypeScriptIcon }
120+ description = " Get user details from your backend for thirdweb wallets in TypeScript"
121+ href = " /references/typescript/v5/getUser"
122+ />
123+ </Stack >
0 commit comments