privy
Use when building wallet infrastructure, authentication systems, or financial applications. Reach for Privy when you need to create embedded wallets, manage user authentication, execute blockchain transactions, set up access controls and policies, or build treasury/agent wallet systems. Use for consumer apps, trading platforms, fintech products, and organizational wallet management.
How do I install this agent skill?
npx skills add https://docs.privy.io --skill privyIs this agent skill safe to install?
No partner audit is available yet. Read the source before installing.
What does this agent skill do?
Privy Skill Reference
Product summary
Privy is a programmable wallet infrastructure platform for building financial applications on blockchain. It provides embedded wallets, authentication, transaction execution, and policy controls across 50+ blockchains (Ethereum, Solana, Tempo, Bitcoin, etc.). Use Privy to authenticate users, create and manage wallets, execute transactions, enforce spending policies, and build complete financial experiences without building wallet infrastructure from scratch.
Key resources:
- REST API: All endpoints require Basic Auth with
privy-app-idheader and app secret - Client SDKs: React, React Native, Node.js, Python, Go, Java, Ruby, Rust, Swift, Android, Flutter, Unity
- Dashboard: Configure apps, create authorization keys, manage login methods, set up webhooks
- App ID and app secret: Found in Dashboard > App settings > Basics tab
When to use
Reach for Privy when:
- Building user authentication flows (email, social, passkeys, wallet-based)
- Creating embedded wallets for users or organizations
- Executing blockchain transactions (transfers, swaps, DeFi interactions)
- Setting up access controls and spending policies for wallets
- Building treasury or agent wallet systems with multi-sig approval
- Managing digital assets across multiple chains
- Implementing wallet automations or event-driven workflows
- Integrating fiat on/off-ramps or card spend
- Requiring KYC/KYB verification for users or organizations
Quick reference
Essential API headers (all requests)
Authorization: Basic base64(app_id:app_secret)
privy-app-id: your-app-id
Core SDK setup patterns
React (client-side)
<PrivyProvider appId="your-app-id" clientId="your-client-id" config={{...}}>
{children}
</PrivyProvider>
Node.js (server-side)
const client = new PrivyClient({
appId: 'your-app-id',
appSecret: 'your-app-secret'
});
Key file paths and configuration
| Item | Location |
|---|---|
| App ID & secret | Dashboard > App settings > Basics |
| Authorization keys | Dashboard > Wallets > Authorization keys |
| Webhooks | Dashboard > Configuration > Webhooks |
| Login methods | Dashboard > Configuration > Login methods |
| Policies | Dashboard > Wallets > Policies (or via API) |
| App clients | Dashboard > Configuration > App clients |
Common wallet operations
| Operation | Use case | Endpoint/Method |
|---|---|---|
| Create wallet | Provision user wallet | POST /wallets or createEthereumWallet() |
| Get wallet | Retrieve wallet details | GET /wallets/{id} or useWallets() |
| Send transaction | Transfer assets | POST /wallets/{id}/ethereum/eth_send_transaction |
| Sign message | Verify ownership | POST /wallets/{id}/ethereum/personal_sign |
| Swap tokens | Exchange assets | POST /wallets/{id}/swap/execute |
| Get balance | Check wallet funds | GET /wallets/{id}/balance |
Authentication methods (configurable in dashboard)
- Email/SMS/WhatsApp (OTP-based)
- Social (Google, Discord, Twitter, Apple, etc.)
- Wallet-based (MetaMask, Phantom, Farcaster)
- Passkeys (WebAuthn)
- Custom OAuth
- Guest accounts
Decision guidance
When to use embedded vs external wallets
| Scenario | Embedded | External |
|---|---|---|
| New users, seamless onboarding | ✓ | |
| Users bring existing wallets | ✓ | |
| Full app control over keys | ✓ | |
| User self-custody preference | ✓ | |
| Multi-chain support needed | ✓ | ✓ |
| Non-custodial requirement | ✓ | ✓ |
When to use wallet actions vs RPC vs intents
| Approach | Best for | Complexity |
|---|---|---|
| Wallet actions | Transfers, swaps, DeFi, deposits | Low (Privy handles complexity) |
| RPC | Custom transaction flows, raw signing | High (construct payloads manually) |
| Intents | Async approval workflows, organizations | Medium (asynchronous authorization) |
| Automations | Event-driven actions, recurring flows | Low (Privy monitors and executes) |
Authorization models for wallets
| Model | Owner | Signers | Use case |
|---|---|---|---|
| User-owned | User | None | Self-custodial consumer wallets |
| User + server | User | App server (scoped) | Automated trading, limit orders |
| App-owned | Authorization key | None | Treasury, agents, bots |
| Custodial | Licensed custodian | None | Regulated account model |
Workflow
1. Set up your Privy app
- Create app in Privy Dashboard
- Copy app ID and app secret from App settings > Basics
- Create app client if using mobile/non-web platforms
- Configure login methods in Configuration > Login methods
- Set up webhooks in Configuration > Webhooks (optional)
2. Integrate authentication
- Install appropriate SDK (React, Node.js, etc.)
- Wrap app with PrivyProvider (client) or initialize client (server)
- Use
usePrivy()hook (React) or client methods to authenticate users - Check
readystate before consuming Privy state - Handle login methods configured in dashboard
3. Create and manage wallets
- For embedded wallets: Enable
createOnLoginin PrivyProvider config or call create wallet API - For external wallets: Configure external wallet connectors in dashboard
- Retrieve wallet via
useWallets()hook orGET /walletsAPI - Store wallet ID for later operations
4. Execute transactions
- Choose approach: wallet actions (recommended), RPC, or intents
- For wallet actions: Call transfer, swap, or earn endpoints with wallet ID
- For RPC: Construct transaction payload and sign via wallet provider
- For intents: Create intent, collect signatures, execute asynchronously
- Monitor via webhooks or polling transaction status
5. Set up controls and policies
- Create authorization keys in dashboard or via API for server/app control
- Define policies via dashboard or
POST /policiesAPI - Attach policies to wallets or signers
- Test policy enforcement in sandbox before production
6. Monitor and verify
- Subscribe to relevant webhooks (transaction, wallet, user events)
- Poll transaction status via
GET /transactions/{id}if not using webhooks - Verify policy enforcement by attempting restricted actions
- Check activity logs in dashboard
Common gotchas
- HTTPS required for embedded wallets: Embedded wallets use WebCrypto API, only available in secure contexts (https://). Fails silently on http:// except localhost.
- App secret exposure: Never expose app secret in client-side code. Use only in server-side SDKs or REST API calls with Basic Auth.
- Missing authorization signatures: Wallet API requests require authorization signatures when policies are attached. Signature count must match wallet's authorization threshold.
- Wallet creation on login: Automatic wallet creation only works with Privy modal login, not direct methods like
loginWithCodeoruseLoginWithOAuth. - Rate limits: REST API has rate limits (HTTP 429). Implement exponential backoff retry logic.
- Stale auth tokens: Access tokens expire. Refresh before use or handle 401 errors gracefully.
- Policy evaluation timing: Policies are evaluated at request time in secure enclaves. Changes take effect immediately but may not be reflected in cached client state.
- Webhook delivery: Webhooks are delivery notifications, not guaranteed delivery. Use polling as source of truth for critical operations.
- Cross-chain transfers: Incur exchange fees beyond gas. Use quote API to preview costs before execution.
- External wallet signing: Some wallets (e.g., Fireblocks) return raw signatures, not serialized transactions. Attach signature to original transaction before sending.
Verification checklist
Before submitting work with Privy:
- App ID and app secret are correctly configured (never expose secret client-side)
- PrivyProvider wraps app at root level (React) or client initialized (server)
-
readystate checked before consuming Privy hooks/state - Authentication method configured in dashboard matches implementation
- Wallet creation tested (automatic or manual) and wallet ID retrievable
- Transaction execution tested with correct wallet ID and chain
- Authorization keys created and signatures included if policies attached
- Policies tested with restricted and allowed actions
- Webhooks configured and tested (or polling implemented as fallback)
- Error handling covers 401 (auth), 429 (rate limit), and transaction failures
- HTTPS used for production (embedded wallets require secure context)
- App clients configured for mobile/non-web platforms
- Sensitive operations (policy changes, key exports) require appropriate authorization
Resources
Comprehensive navigation: https://docs.privy.io/llms.txt
Critical documentation:
- Getting Started — Product overview and core concepts
- REST API Introduction — API authentication and endpoints
- React SDK Setup — Client-side integration guide
For additional documentation and navigation, see: https://docs.privy.io/llms.txt
How can the creator link this skill?
Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.
<a href="https://skillzs.dev/skills/docs.privy.io/privy">View privy on skillZs</a>