Bitcoin Forum
May 12, 2024, 05:51:58 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: BlockChain.info SendMany API - Need Help  (Read 641 times)
newIndia (OP)
Legendary
*
Offline Offline

Activity: 2212
Merit: 1049


View Profile
May 17, 2014, 09:51:11 AM
 #1

I am trying to send transaction to many people from a wallet using blockchain.info SendMany API. I am using the following URL for the same...

Code:
http://blockchain.info/merchant/$guid/sendmany?password=$firstpassword&recipients=$recipients&note=$note

Source: https://blockchain.info/api/api_send

As long as I'm not using &note=$note, but it stops working when I include this to have a public note attached. Anyone knows how to overcome this ? Do I need to use something else instead of 'note' as a param ? Any help in this regard is highly appreciated...

1715493118
Hero Member
*
Offline Offline

Posts: 1715493118

View Profile Personal Message (Offline)

Ignore
1715493118
Reply with quote  #2

1715493118
Report to moderator
1715493118
Hero Member
*
Offline Offline

Posts: 1715493118

View Profile Personal Message (Offline)

Ignore
1715493118
Reply with quote  #2

1715493118
Report to moderator
1715493118
Hero Member
*
Offline Offline

Posts: 1715493118

View Profile Personal Message (Offline)

Ignore
1715493118
Reply with quote  #2

1715493118
Report to moderator
Whoever mines the block which ends up containing your transaction will get its fee.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715493118
Hero Member
*
Offline Offline

Posts: 1715493118

View Profile Personal Message (Offline)

Ignore
1715493118
Reply with quote  #2

1715493118
Report to moderator
1715493118
Hero Member
*
Offline Offline

Posts: 1715493118

View Profile Personal Message (Offline)

Ignore
1715493118
Reply with quote  #2

1715493118
Report to moderator
newIndia (OP)
Legendary
*
Offline Offline

Activity: 2212
Merit: 1049


View Profile
May 18, 2014, 11:47:53 AM
 #2

Looks like the 'note' param has got the problem. None is using this feature ?

Code:
https://blockchain.info/merchant/$guid/payment?password=$main_password&second_password=$second_password&to=$address&amount=$amount&from=$from&shared=$shared&fee=$fee¬e=$note

Initscri
Hero Member
*****
Offline Offline

Activity: 1554
Merit: 759


View Profile WWW
May 21, 2014, 08:20:18 PM
 #3

It might be an issue with a limit of the GET request.

Did an error come up to show the payment did not go through. Can you post the error here (obv don't if it contains secret information).

----------------------------------
Web Developer. PM for details.
----------------------------------
BitCoinDream
Legendary
*
Offline Offline

Activity: 2324
Merit: 1204

The revolution will be digital


View Profile
May 21, 2014, 09:44:57 PM
 #4

the problem is, I think, '&not' of &note represents an ASCII character and hence HTTP get is unable to take this param.

Initscri
Hero Member
*****
Offline Offline

Activity: 1554
Merit: 759


View Profile WWW
May 21, 2014, 11:50:13 PM
 #5

the problem is, I think, '&not' of &note represents an ASCII character and hence HTTP get is unable to take this param.

Which then begs the question: Why is he using an API url within Html.

You should be sending the request to the BlockChain.info servers using a programming language such as PHP.
Example:

Code:
<?

$guid="GUID_HERE";
$firstpassword="PASSWORD_HERE";
$secondpassword="PASSWORD_HERE";
$amounta = "10000000";
$amountb = "400000";
$addressa = "1A8JiWcwvpY7tAopUkSnGuEYHmzGYfZPiq";
$addressb = "1ExD2je6UNxL5oSu6iPUhn9Ta7UrN8bjBy";
$recipients = urlencode('{
                  "'.$addressa.'": '.$amounta.',
                  "'.$addressb.'": '.$amountb.'
               }');

$json_url = "http://blockchain.info/merchant/$guid/sendmany?password=$firstpassword&second_password=$secondpassword&recipients=$recipients";

$json_data = file_get_contents($json_url);

$json_feed = json_decode($json_data);

$message = $json_feed->message;
$txid = $json_feed->tx_hash;

?>

----------------------------------
Web Developer. PM for details.
----------------------------------
BitCoinDream
Legendary
*
Offline Offline

Activity: 2324
Merit: 1204

The revolution will be digital


View Profile
May 22, 2014, 10:51:06 AM
 #6

the problem is, I think, '&not' of &note represents an ASCII character and hence HTTP get is unable to take this param.

Which then begs the question: Why is he using an API url within Html.

You should be sending the request to the BlockChain.info servers using a programming language such as PHP.
Example:

Code:
<?

$guid="GUID_HERE";
$firstpassword="PASSWORD_HERE";
$secondpassword="PASSWORD_HERE";
$amounta = "10000000";
$amountb = "400000";
$addressa = "1A8JiWcwvpY7tAopUkSnGuEYHmzGYfZPiq";
$addressb = "1ExD2je6UNxL5oSu6iPUhn9Ta7UrN8bjBy";
$recipients = urlencode('{
                  "'.$addressa.'": '.$amounta.',
                  "'.$addressb.'": '.$amountb.'
               }');

$json_url = "http://blockchain.info/merchant/$guid/sendmany?password=$firstpassword&second_password=$secondpassword&recipients=$recipients";

$json_data = file_get_contents($json_url);

$json_feed = json_decode($json_data);

$message = $json_feed->message;
$txid = $json_feed->tx_hash;

?>

The one u have mentioned from the blockchain.info send API does not have the 'note' param. If include the 'note' param in the json_url, it'll eventually throw an error at file_get_contents, where the jso_url is parsed.

Initscri
Hero Member
*****
Offline Offline

Activity: 1554
Merit: 759


View Profile WWW
May 22, 2014, 11:05:26 PM
 #7

The one u have mentioned from the blockchain.info send API does not have the 'note' param. If include the 'note' param in the json_url, it'll eventually throw an error at file_get_contents, where the jso_url is parsed.

I was, more or less, just posting a template for use.
What error would it return. I don't see a reason as to why it would return an error provided he uses

Code:
urlencode($note);

before providing the note.

Therefore:
This is just a test note
would turn into:
This%20is%20a%20test%20note

and would be accepted by BlockChain.info.

As an example: The code should be along the lines of:

Code:
<?
$note = urlencode("NOTE HERE");
$guid="GUID_HERE";
$firstpassword="PASSWORD_HERE";
$secondpassword="PASSWORD_HERE";
$amounta = "10000000";
$amountb = "400000";
$addressa = "1A8JiWcwvpY7tAopUkSnGuEYHmzGYfZPiq";
$addressb = "1ExD2je6UNxL5oSu6iPUhn9Ta7UrN8bjBy";
$recipients = urlencode('{
                  "'.$addressa.'": '.$amounta.',
                  "'.$addressb.'": '.$amountb.'
               }');

$json_url = "http://blockchain.info/merchant/$guid/sendmany?password=$firstpassword&second_password=$secondpassword&recipients=$recipients&note=$note";

$json_data = file_get_contents($json_url);

$json_feed = json_decode($json_data);

$message = $json_feed->message;
$txid = $json_feed->tx_hash;

?>

----------------------------------
Web Developer. PM for details.
----------------------------------
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!