authenticate-wallet
Authenticate Agnic wallet via browser OAuth or headless API token. Use when the user wants to sign in, log in, authenticate, connect wallet, set up CLI, or resolve "Not authenticated" errors. Supports AGNIC_TOKEN env var for CI/server/agent environments.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/agnicpay-prog/agnic-authenticate-walletAuthenticating the Agnic Wallet
Check Current Status
npx agnic@latest status --json
If already authenticated, no further action needed. If not, choose the appropriate mode below.
Mode 1: Headless / Token Auth (CI, servers, agents)
Preferred when no browser is available. Generate an API token at app.agnic.ai > Settings > API Tokens.
Option A -- Environment variable (recommended for automation):
export AGNIC_TOKEN=<your-api-token>
npx agnic@latest status --json
The CLI reads AGNIC_TOKEN automatically. All subsequent commands in the same shell session use it without extra flags.
Option B -- Inline flag (one-off commands):
npx agnic@latest --token <your-api-token> status --json
Mode 2: Browser OAuth (interactive terminals)
Use when a browser is available:
npx agnic@latest auth login
This command:
- Starts a temporary local server on a random port
- Opens the default browser to the Agnic OAuth consent screen
- The user signs in (email, Google, or wallet) and approves spending limits
- The browser redirects back to
http://localhost:<port>/callback - The CLI exchanges the authorization code for tokens and saves them locally
Wait for the CLI to print Authenticated! before proceeding.
Verify Authentication
npx agnic@latest status --json
Expected output:
{
"authenticated": true,
"userId": "did:privy:...",
"email": "[email protected]",
"walletAddress": "0x...",
"tokenExpiry": "2026-05-22T14:30:00Z"
}
Logout
To remove stored credentials:
npx agnic@latest auth logout
Token Storage
- Browser mode: credentials stored in
~/.agnic/config.jsonwith0600permissions. Tokens auto-refresh on 401 responses. Refresh token expires after 90 days. - Token mode: no local storage. The token is read from
AGNIC_TOKENenv var or--tokenflag per invocation.
Error Handling
- "Not authenticated" -- Set
AGNIC_TOKENenv var, pass--token, or runauth login - "Authentication failed" -- User cancelled the browser flow or the 5-min timeout expired
- "Could not open browser" -- The CLI prints a URL to copy and open manually
- "Token expired" -- Browser tokens auto-refresh; API tokens must be regenerated at app.agnic.ai
- "Invalid token" -- Check the token value; it may have been revoked or malformed
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-agnicpay-prog-agnic-authenticate-wallet": {
"enabled": true,
"auto_update": true
}
}
}Related Skills
trade-tokens
Swap or trade tokens on Base network. Use when you or the user want to trade, swap, exchange, buy, sell, or convert between tokens like USDC, ETH, and WETH. Covers phrases like "buy ETH", "sell ETH for USDC", "convert USDC to ETH", "get some ETH", "swap tokens", "trade USDC for WETH".
check-balance
Check USDC balance across networks (Base, Solana). Use when the user wants to check balance, see how much USDC is available, view funds, or verify wallet balance. Covers "check my balance", "how much do I have", "show funds", "wallet balance".
ai-gateway
Access 340+ AI models via the Agnic AI Gateway -- chat, image generation, model listing. Use when the user wants to chat with AI, generate images, ask GPT, use Claude, list models, delegate to another LLM, or get a second opinion. Covers "ask GPT", "use Claude", "generate an image", "list AI models", "call a model".
authenticate-wallet
Authenticate Agnic wallet via browser OAuth or headless API token. Use when the user wants to sign in, log in, authenticate, connect wallet, set up CLI, or resolve "Not authenticated" errors. Supports AGNIC_TOKEN env var for CI/server/agent environments.
agnic
Complete AI agent wallet with payments, trading, email, and on-chain identity. Use when the user wants to manage their agent's wallet, make payments, trade tokens, send/receive email, or check their agent identity.