SPL-20 Tokens on Solana Blockchain can be traded and airdropped in exchange for other Non-fungible Tokens or some services. In this article, we will see how we can transfer any SPL token to more than one receiver on Solana.

Blockchain technology is perhaps most well-known for being the backbone of various premier cryptocurrencies such as Bitcoins, Ethereum, Solana, etc. While there are 20000+ cryptocurrencies today, investors are only interacting with a handful of the most popular cryptocurrencies in the world. But what are cryptocurrencies? Cryptocurrencies or Fungible Tokens are digital tokens or coins that exist on a Blockchain and are stored in digital wallets called crypto wallets. Fungible Tokens are the basis of currency on the Solana blockchain, where each and every token has a unique value.
Cryptocurrencies are transferable from one crypto wallet to another, and they are pretty much used like regular currency for trading NFTs or even sometimes physical products. In certain cases, it may be required to transfer (or airdrop) tokens to more than one user on Solana. This is where SHYFT steps in. SHYFT provides a series of Web3 APIs for almost all operations on Solana Blockchain, which include APIs for NFTs, Fungible Tokens, Wallets, and NFT Marketplace.
In this blog, we will see how we can airdrop tokens to multiple receivers on the Solana blockchain using SHYFT APIs.
Read SHYFT API Documentation here.
Before getting started
To get started, we will need a few things.
**Phantom Wallet
**We will need the Phantom wallet browser extension, you can download it from the link below.
Chrome/Brave.
Firefox.
Once done, set up your Phantom wallet account. On-screen tips are available, which will guide you through setting up and getting started. You can also find a detailed guide related to this here.
**Authentication: Getting your Shyft API key
**x-api-key is an authentication parameter, which gives you access to SHYFT APIs. You can get your own API Key from the SHYFT website. Just signup with your email id here and you can get it for free.
List of Token Receivers
SHYFT provides a low-code API-based solution for airdropping SPL tokens to more than one receiver. Before using that, we must collect all the details (parameters) required to make the API call. We have used a form to accept all the necessary details to make the API call, but any other method can be used as per requirement.

Form for accepting the required data for the API call
Airdopping Tokens — The API Call
SHYFT provides a set of Web3 APIs for various operations on Solana including NFTs, Fungible Tokens, Wallets, Marketplace APIs, and many more, which allow users to build dApps without any prior Web3 experience. The API endpoint for airdropping tokens to multiple users:
POST <https://api.shyft.to/sol/v1/token/airdrop>
This API accepts the x-api-key in the header, an authorization parameter used by SHYFT. You can get your own API key from the SHYFT website for free here. The parameters required for this API call are:
network: Selects the Solana network cluster, which can be eitherdevnet,testnetormainnet-beta.token_address: Accepts the address of the SPL-20 Tokens to be airdropped.from_address: Accepts the source account address from which SPL-20 tokens will be debited.transfer_info: This field accepts an array of objects, which specifies the receiver addresses and amount of tokens to be airdropped in the specified format.
"transfer_info": [
{
"to_address": "97a3giHcGsk8YoEgWv4rP2ooWwJBgS72fpckZM6mQiFH",
"amount": 2
},
{
"to_address": "AE4kh5FsCDWeJfqPsKx7zC9ijkqKpCuYQxh8FYBiTJe",
"amount": 5
}
]
For details on SHYFT APIs and parameters, click here, or you can also try our APIs on swagger UI. Once the API request is successfully executed, we should have a response like this.
{
"success": true,
"message": "Airdrop tokens request generated successfully",
"result": {
"encoded_transaction": [
"AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAIPjlCtsELWJl97h5yDtobRADXUyvXT9dlM1oxZPoaUeKg/dh9+VD4S2R+3q17KEqlHi/GR+DgdragDPFr+qvd52Ea6sBLL4z5mF7dZ/deiz96fjiMgCfGZEczn2Am+z9AtQ8ueGdnVJq+mbxlyZh43qrWb0nVwNad39QcibG1vQy9qwVfISvnJUlny6o8HbWGwc+8/x3aEM9QiFCvk3M9feYIR4VW/5pMSCihcEFbGcqnPwPUXZFaQBrNflgdkMiumgkLttCjLZYg3h1Iblk7/eoapIpJvHSVho59jNyaKZROC3QmBGYLu6yx9h6yRr9OlJBJ0z51M1cwLpaIugOb9V4o/XXMqfkwj+1I1XZ6nVj2Kjsdrna8pkMcJujNxRTPjyDGmfLg6xNhu9NDmNtXnhx0ZrxBqwdoCsUBaP+p1ChjQL3nfrMt1AYVzT4AwAl5g06l3zFrKTKFs2twILkEdlNmKfn8ji0NWQ/63YuSrES+TC2hsyo7zTuFIJ+wH8OXO6xJVGwfhWyMncZ+RaM842aArSJH7vjkf+fJIPrKRqxkzUnvqkKk9xgLz7ESDXWhSKunzibV+8TTasl6JupSX/Qbd9uHXZaGT2cvhRs7reawctIXtX1s3kTqM9YV+/wCp4t5rMBYjKjVSUoW1cKJn/RhyIyjJ7jUlV7h3pDHHVesLDgQCDQsACgwAwusLAAAAAAkOBAINCAAKDADC6wsAAAAACQ4EAg0JAAoMAMLrCwAAAAAJDgQCDQwACgwAwusLAAAAAAkOBAINBwAKDADC6wsAAAAACQ4EAg0DAAoMAMLrCwAAAAAJDgQCDQoACgwAwusLAAAAAAkOBAINBgAKDADC6wsAAAAACQ4EAg0FAAoMAMLrCwAAAAAJDgQCDQQACgwAwusLAAAAAAkOBAINAQAKDADC6wsAAAAACQ=="
],
"signer": "AaYFExyZuMHbJHzjimKyQBAH1yfA9sKTxSzBc6Nr5X4s"
}
}
The encoded_transaction returned in the response contains an array of encoded transactions that requires a signature from the wallet specified in the from_address field of the API call (also specified in the signer field of the response).
Note: There is no limit on the number of destination addresses. 11 token transfer instructions are batched in 1 transaction. If there, are more than 11 addresses to airdrop the tokens, then multiple transactions will be returned.
Signing the Transaction(s)
To know about Signing Transactions on Solana, you can follow our dev guide here, or you can also check our GitHub repo for all the functions required to sign encoded transactions. Once done, all the transactions are signed, the instructions will be executed by the Solana Runtime and the tokens will be airdropped.

Airdropped Tokens to multiple wallets
That’s pretty much everything about how we can airdrop SPL-20 Tokens to multiple users on Solana in one API call. If you liked this tutorial, feel free to check out our other tutorials on minting NFTs from metadata URI or creating a Web3 game with tokens on Solana(series). We hope you have a great time building dApps with SHYFT APIs on Solana. Happy Hacking!
Resources
SHYFT API Documentation
Shyft Website
Get API Key
GitHub
Join our Discord
Try out our APIs on Swagger UI


