AuthenticationOverview

Authentication

web3market-kit uses API keys for authentication. Authentication is required for deploying to remote chains, browsing templates, AI contract review, marketplace publishing, and AI chat. Local development features work without it.

Getting an API Key

Create an account

Sign up at web3.market.

Generate a key

Go to Dashboard > Plan & API and click New Key. Your key looks like:

wm_sk_live_a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6

Copy it immediately — it is only shown once.

Authenticate via the CLI

w3m auth wm_sk_live_your_key_here

The CLI validates the key against the API, stores it in ~/.web3market/credentials.json, and displays your account info.

Key Format

PrefixPurpose
wm_sk_live_Production keys
wm_sk_test_Test keys

Keys are 48 characters long (prefix + 32 hex characters).

Credential Storage

The CLI stores your API key in ~/.web3market/credentials.json in your home directory (not in your project). This file is created by w3m auth and read automatically by all CLI commands that require authentication.

{
  "apiKey": "wm_sk_live_..."
}

You can also set the key as an environment variable:

WEB3MARKET_API_KEY=wm_sk_live_your_key_here

The CLI checks the environment variable first, then falls back to the credentials file.

⚠️

Do not commit API keys to version control. The credentials file is in your home directory, not in your project.

CLI Commands

CommandDescription
w3m auth <key>Validate and store an API key
w3m auth --statusShow current auth status (name, email, tier, masked key)
w3m auth --logoutDelete stored credentials

What Requires Authentication

FeatureAPI keyAI providerPlan
Create a project (w3m new)NoNoFree
Start dev environment (w3m dev)NoNoFree
Deploy locally (Anvil)NoNoFree
Run tests (w3m test)NoNoFree
Security audit (w3m audit)NoNoFree
Interactive workspace (w3m)NoNoFree
Auto-fix (w3m fix)NoYesFree
AI Chat (w3m chat)YesYesFree
AI contract review (w3m audit --ai)YesNoPro
Deploy to testnet (w3m deploy --chain sepolia)YesNoFree
Deploy to mainnet (w3m deploy --chain ethereum)YesNoPro
Browse templates (w3m templates)YesNoFree
Publish (w3m publish)YesNoPro

AI provider means your own Anthropic (Claude) or OpenAI (GPT) key, configured via w3m ai setup.

All local development features work without authentication. An API key is needed for deploying to remote chains, browsing templates, AI chat, and marketplace publishing.

API Key Authentication

All API requests include the key in the X-API-Key header:

curl https://api.web3.market/api/auth/me \
  -H "X-API-Key: wm_sk_live_your_key_here" \
  -H "Accept: application/json"

See the API Reference for endpoint details and rate limits.