Author

Topic: Blockchain api key (Read 156 times)

legendary
Activity: 2758
Merit: 6830
June 28, 2018, 09:08:23 PM
#6
@HCP is right. I edited my original post.

The https://blockchain.info/merchant/xxxxxxx keeps redirecting you back to the Blockchain API doc page.
HCP
legendary
Activity: 2086
Merit: 4314
June 28, 2018, 06:15:11 PM
#5
Don't you have to install a service on your local machine to use the API? Huh
To use this API, you will need to run small local service which be responsible for managing your Blockchain Wallet. Your application interacts with this service locally via HTTP API calls.
Click here for complete setup instructions on GitHub.

I don't think you can connect to: https://blockchain.info/merchant
newbie
Activity: 20
Merit: 0
June 28, 2018, 12:54:09 PM
#4
I'm getting NULL when running the code:

https://blockchain.info/merchant/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/sendmany?password=xxxxxx&second_password=xxxxxx&recipients=%7B%0D%0A++++++++++++++++++%221NfGMB5DNVitjvUKk2UJw2iZH28sAGP6XX%22%3A+600%0D%0A+++++++++++++++%7D

NULL



Code:
$guid="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
$firstpassword="xxxxxxxxxxx";
$secondpassword="xxxxxxxxxxx";
$amounta = "600";
$addressa = "1NfGMB5DNVitjvUKk2UJw2iZH28sAGP6XX";
$recipients = urlencode('{
                  "'.$addressa.'": '.$amounta.'
               }');

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

echo $json_url."\n";

$json_data = file_get_contents($json_url);
$json_feed = json_decode($json_data);

var_export($json_feed);
legendary
Activity: 2758
Merit: 6830
June 28, 2018, 11:48:35 AM
#3
Install and run the local service and make the requests to it.

The base URL for all requests is: https://blockchain.info/merchant/$guid/ "https://localhost:3000/merchant/$guid" where $guid is your Blockchain Wallet ID (used to login), and you should use the parameter "?password=main_password" where main_password is your wallet password.

Here is an example for PHP:
Code:

$guid="GUID_HERE"; // YOUR WALLET ID
$firstpassword="PASSWORD_HERE"; // YOUR PASSWORD
$secondpassword="PASSWORD_HERE"; // SECOND PASSWORD IF YOUR ACCOUNT HAS DOUBLE ENCRYPTION ENABLED
$amounta = "10000000";
$amountb = "400000";
$addressa = "1A8JiWcwvpY7tAopUkSnGuEYHmzGYfZPiq";
$addressb = "1ExD2je6UNxL5oSu6iPUhn9Ta7UrN8bjBy";
$recipients = urlencode('{
                  "'.$addressa.'": '.$amounta.',
                  "'.$addressb.'": '.$amountb.'
               }');

$json_url = "http://localhost:3000/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;

?>

Source: https://www.blockchain.com/pt/api/blockchain_wallet_api
copper member
Activity: 2856
Merit: 3071
https://bit.ly/387FXHi lightning theory
June 28, 2018, 08:54:29 AM
#2
It should already be linked if you got it from your account on blockchain's website.
newbie
Activity: 20
Merit: 0
June 28, 2018, 08:37:06 AM
#1
I received an api key from blockchain, I'm using it to create unique addresses so I can receive payments, how do I link that api key to my blockchain wallet account
Jump to: