# requestAirdrop

Requests an airdrop of lamports to a account.

#### Parameters required for this RPC call

* The address (publicKey) of account to receive lamports, as a base-58 encoded string.
* The amount of lamports to airdrop
* **configuration** : This contains the following parameters, all are optional fields.
  * **commitment**: The commitment describes how finalized a block is at that point in time. Commitment levels <mark style="color:yellow;">processed</mark>, <mark style="color:yellow;">confirmed</mark> and <mark style="color:yellow;">finalized</mark> are supported, defaults to <mark style="color:yellow;">finalized</mark>.

{% tabs %}
{% tab title="cURL" %}

<pre class="language-bash"><code class="lang-bash">curl https://rpc.shyft.to?api_key=YOUR-API-KEY -s -X \
<strong>  POST -H "Content-Type: application/json" -d ' 
</strong>   {
     "jsonrpc": "2.0",
     "id": 1,
     "method": "requestAirdrop",
     "params": [
       "83astBRguLMdt2h5U1Tpdq5tjFoJ6noeGwaY3mDLVcri",
       1000000000,
       {
         "commitment": "finalized"
       }
     ]
   }
 '
</code></pre>

{% endtab %}

{% tab title="Web3.js" %}

```javascript
import {
  Connection,
  LAMPORTS_PER_SOL,
  PublicKey,
  clusterApiUrl,
} from "@solana/web3.js";

const connection = new Connection("https://rpc.shyft.to?api_key=YOUR-API-KEY", "confirmed");

let receiver = new PublicKey("4kg8oh3jdNtn7j2wcS7TrUua31AgbLzDVkBZgTAe44aF");

let airdropAmt = 1 * LAMPORTS_PER_SOL;

let sig = await connection.requestAirdrop(receiver, airdropAmt);

console.log(sig);
```

{% endtab %}

{% tab title="Response" %}

```json
{
  "jsonrpc": "2.0",
  "result": "5VERv8NMvzbJMEkV8xnrLkEaWRtSz9CosKDYjCJjBRnbJLgp8uirBgmQpjKhoR4tjF3ZpRzrFmBV6UjKdiSZkQUW",
  "id": 1
}
```

{% endtab %}
{% endtabs %}
