Testnet Onboarding
Start building with Urblock on the Polygon Amoy testnet — no real funds required.
1. Get a Test API Key
Create an account at dashboard.urblock.io and generate a test API key:
// Your test key starts with sk_test_
const urblock = new Urblock("sk_test_...");
Test keys operate exclusively on testnet networks (Polygon Amoy).
2. Request Testnet Tokens
Use the built-in faucet to get testnet MATIC for gas:
// Check faucet status
const status = await urblock.faucet.getStatus();
console.log(status.networks); // available networks with cooldown_hours
// Check faucet balance
const balances = await urblock.faucet.getBalances();
console.log(balances);
const drip = await urblock.faucet.drip({
network: "net_polygon_amoy",
wallet_address: "0xYourConnectAccountAddress",
});
console.log(drip.tx_hash);
curl
# Get faucet status
curl https://api.urblock.io/v1/faucet/status
# Request tokens (JWT auth required)
curl -X POST https://api.urblock.io/v1/faucet/drip \
-H "Authorization: Bearer eyJ..." \
-H "Content-Type: application/json" \
-d '{ "network": "net_polygon_amoy", "wallet_address": "0x..." }'
3. Deploy Your First Token
const token = await urblock.tokens.create({
name: "Test Token",
symbol: "TST",
standard: "ERC20",
network: "polygon_amoy",
initial_supply: "1000000000000000000000000",
idempotency_key: "test-deploy-001",
});
4. Verify on Explorer
Check your deployment on the Polygon Amoy explorer:
https://amoy.polygonscan.com/address/{contract_address}
Test vs Live Keys
| Aspect | sk_test_ | sk_live_ |
|---|---|---|
| Network | Polygon Amoy (testnet) | Polygon PoS (mainnet) |
| Funds | Free (faucet) | Real MATIC required |
| Contracts | Testnet only | Mainnet |
| Rate limits | Same | Same |
| API behavior | Identical | Identical |
Testnet Workflow
- Develop with
sk_test_on Polygon Amoy - Test all flows with testnet tokens
- Verify transactions on Amoy explorer
- Switch to
sk_live_for production
The API behavior is identical between test and live — switch keys to go to production.
Next Steps
- Deploy Your First Token — full deployment guide
- API: Faucet — faucet endpoint reference
- SDK: Faucet — SDK faucet methods
- Webhook Integration — set up real-time notifications
- Authentication — understand API key types