Airdrop NFTs
Engine makes it effortless for any developer to airdrop NFTs at scale. You sponsor the gas so your users only need a wallet address!
This guide references Polygon Mumbai testnet and NextJS but is applicable for any EVM chain and full-stack framework.

Prerequisites
- An Engine instance
- A backend wallet with MATIC on Mumbai
- A deployed NFT contract that can be claimed by the backend wallet
- A client ID and secret key from the API Keys page
Frontend: Add Connect Wallet and Claim buttons
Use <ConnectWallet>
to prompt the user for their wallet. The Claim button calls POST /api/claim
.
Replace <thirdweb_client_id>
.
Backend: Call Engine to mint an NFT
POST /api/claim
calls Engine to mint an NFT to the user's wallet.
Try it out!
Here’s what the user flow looks like.
The app prompts the user to connect their wallet.


A user presses claim.

They'll receive the NFT in their wallet shortly!

Full code example
The code above is simplified for readability. View the full source code →