Transfer HBAR
Last updated
Last updated
GET
https://api.bountyblok.io/v1/airdrop_token_hedera
This endpoint allows you to send HBAR.
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
{
"tx_id": "0.0.47834406-1673376025-212913600",
"is_valid": true
}
{
"is_valid": false,
"message": "Transaction Failed Pre-Check: InsufficientPayerBalance"
}
curl --location --request POST 'https://api.bountyblok.io/v1/airdrop_token_hedera' \
--header 'Authorization: Bearer <<API TOKEN>>' \
--header 'Content-Type: application/json' \
--data-raw '{
"to_address":"0.0.47879121",
"quantity":10
}'
var client = new RestClient("https://api.bountyblok.io/v1/airdrop_token_hedera");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <<API TOKEN>>");
request.AddHeader("Content-Type", "application/json");
var body = @"{
" + "\n" +
@" ""to_address"":""0.0.47879121"",
" + "\n" +
@" ""quantity"":20
" + "\n" +
@"}";
request.AddParameter("application/json", body, ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
var data = JSON.stringify({
"to_address": "0.0.47879121",
"quantity": 20
});
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function() {
if(this.readyState === 4) {
console.log(this.responseText);
}
});
xhr.open("POST", "https://api.bountyblok.io/v1/airdrop_token_hedera");
xhr.setRequestHeader("Authorization", "Bearer <<API TOKEN>>");
xhr.setRequestHeader("Content-Type", "application/json");
xhr.send(data);
import http.client
import json
conn = http.client.HTTPSConnection("api.bountyblok.io")
payload = json.dumps({
"to_address": "0.0.47879121",
"quantity": 20
})
headers = {
'Authorization': 'Bearer <<API TOKEN>>',
'Content-Type': 'application/json'
}
conn.request("POST", "/v1/airdrop_token_hedera", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.bountyblok.io/v1/airdrop_token_hedera',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>'{
"to_address":"0.0.47879121",
"quantity":20
}',
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer <<API TOKEN>>',
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
to_address*
string
The wallet address of the recipient.
quantity*
number
The amount of HBAR you want to send.
Authorization*
string
Bearer <<YOUR_API_KEY>>