Skip to main content

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

Aspectsk_test_sk_live_
NetworkPolygon Amoy (testnet)Polygon PoS (mainnet)
FundsFree (faucet)Real MATIC required
ContractsTestnet onlyMainnet
Rate limitsSameSame
API behaviorIdenticalIdentical

Testnet Workflow

  1. Develop with sk_test_ on Polygon Amoy
  2. Test all flows with testnet tokens
  3. Verify transactions on Amoy explorer
  4. Switch to sk_live_ for production

The API behavior is identical between test and live — switch keys to go to production.

Next Steps