Creates an embedded wallet for an existing user.
curl --request POST \
--url https://api.privy.io/v1/users/{user_id}/wallets \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--header 'privy-app-id: <privy-app-id>' \
--data '{
"wallets": [
{
"chain_type": "ethereum"
}
]
}'
{
"id": "did:privy:clddy332f002tyqpq3b3lv327",
"created_at": 1674788927,
"mfa_methods": [],
"has_accepted_terms": false,
"is_guest": false,
"linked_accounts": [
{
"address": "[email protected]",
"type": "email",
"first_verified_at": 1674788927,
"latest_verified_at": 1674788927,
"verified_at": 1674788927
},
{
"address": "0x095755d4451D138e669CE982fc5B2226A307D88c",
"type": "wallet",
"verified_at": 1674788927,
"first_verified_at": 1674788927,
"latest_verified_at": 1674788927,
"chain_type": "ethereum",
"chain_id": "1",
"wallet_client": "unknown",
"wallet_client_type": "privy",
"connector_type": "embedded"
}
]
}
Basic Auth header with your app ID as the username and your app secret as the password.
ID of your Privy app.
ID of the user.
Object with user data.
The response is of type object
.
curl --request POST \
--url https://api.privy.io/v1/users/{user_id}/wallets \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--header 'privy-app-id: <privy-app-id>' \
--data '{
"wallets": [
{
"chain_type": "ethereum"
}
]
}'
{
"id": "did:privy:clddy332f002tyqpq3b3lv327",
"created_at": 1674788927,
"mfa_methods": [],
"has_accepted_terms": false,
"is_guest": false,
"linked_accounts": [
{
"address": "[email protected]",
"type": "email",
"first_verified_at": 1674788927,
"latest_verified_at": 1674788927,
"verified_at": 1674788927
},
{
"address": "0x095755d4451D138e669CE982fc5B2226A307D88c",
"type": "wallet",
"verified_at": 1674788927,
"first_verified_at": 1674788927,
"latest_verified_at": 1674788927,
"chain_type": "ethereum",
"chain_id": "1",
"wallet_client": "unknown",
"wallet_client_type": "privy",
"connector_type": "embedded"
}
]
}