KingZee (OP)
Sr. Member
Offline
Activity: 952
Merit: 452
Check your coin privilege
|
|
November 03, 2014, 12:00:41 AM |
|
Hi, I am a complete newbie in using any JSON RPC API, I looked a bit in the several APIs out there and decided I would use the Blockchain.info RPC host.
But then I'm now stuck on how exactly do we connect to this host. I am using a windows 7, should I have another OS? I can put a linux on a virtual machine, but only if it's completely necessary.
I also downloaded Ruby, but I didn't understand how exactly I can connect.
Can anyone give me a short procedure on how to you connect to the blockchain rpc host? I would be really glad, thank you.
|
Beep boop beep boop
|
|
|
|
KingZee (OP)
Sr. Member
Offline
Activity: 952
Merit: 452
Check your coin privilege
|
|
November 03, 2014, 09:50:20 AM |
|
I did a little improvement and now instead of not knowing at all how this works, I only get this error "error: could not parse reply from server". It's funny how there is only one post in here with the exact same problem as mine, but absolutely nobody cared about this guy. I was trying to get bitcoind v0.8.1 hooked up to the blockchain.info JSON-RPC and I kept getting: $ bitcoind getinfo error: couldn't parse reply from server
My ~/bitcoin/bitcoin.conf file: rpcconnect=blockchain.info rpcport=443 rpcssl=1 rpcuser=MyWalletGUID rpcpassword=MyS00perS3cretPassword printtoconsole=1 debug=1
I can't figure out what is wrong, I can get curl to work fine and it returns results as expected. I know I had this working some months ago, which makes me think that maybe it is a problem with the newer bitcoind (which I just installed from apt this morning: Bitcoin version v0.8.1.0-g34d62a8-beta)?
|
Beep boop beep boop
|
|
|
Muhammed Zakir
|
|
November 03, 2014, 10:33:51 AM Last edit: November 03, 2014, 10:45:34 AM by Muhammed Zakir |
|
I did a little improvement and now instead of not knowing at all how this works, I only get this error "error: could not parse reply from server". It's funny how there is only one post in here with the exact same problem as mine, but absolutely nobody cared about this guy.
Some may have not seen the post or they couldn't get what was the problem, this maybe the reason there was no reply. Anyway, lets come to the problem! The config file isn't correct, rpc host must be set to rpc.blockchain.info, i.e., rpcconnect=rpc.blockchain.info . Connecting using Bicoind: $ ./bitcoind -rpcconnect=rpc.blockchain.info -rpcport=443 -rpcssl -rpcuser=YourWalletIdentifier -rpcpassword=YourPassword getinfo
P.S. Bitcoind Commands Not Available:getwork setgenerate getmininginfo getmemorypool - Not intended for bitcoin mining keypoolrefill - blockchain.info wallets have no keypool stopwalletpassphrasechange - Disabled for security reasonsdumpprivkey - Disabled for security reasonsencryptwallet - All blockchain.info wallets are encrypted by default. Password change is disabled for security reasonsP.S.(2) You probably want to read 'Methods' in https://blockchain.info/api/json_rpc_api for API calls and its description. ~~MZ~~
|
|
|
|
KingZee (OP)
Sr. Member
Offline
Activity: 952
Merit: 452
Check your coin privilege
|
|
November 03, 2014, 10:44:00 AM |
|
Some may have not seen the post or they couldn't get what was the problem, this maybe the reason there was no reply. Anyway, lets come to the problem! The config file isn't correct, rpc host must be set to rpc.blockchain.info, i.e., rpcconnect=rpc.blockchain.info . Connecting using Bicoind: $ ./bitcoind -rpcconnect=rpc.blockchain.info -rpcport=443 -rpcssl -rpcuser=YourWalletIdentifier -rpcpassword=YourPassword getinfo
P.S. Bitcoind Commands Not Available:getwork setgenerate getmininginfo getmemorypool - Not intended for bitcoin mining keypoolrefill - blockchain.info wallets have no keypool stopwalletpassphrasechange - Disabled for security reasonsdumpprivkey - Disabled for security reasonsencryptwallet - All blockchain.info wallets are encrypted by default. Password change is disabled for security reasons ~~MZ~~ Oh I aready set it to rpc.blockchain.info, sorry if the other person didn't. Here is everything on my bitcoin.conf, I looked for a pre-set one, and edited it removing what was useless, should I remove anything else? server=1 rpcuser=xxxxxx-xxx-xxxx-xxxx-xxxxxx rpcpassword=password rpctimeout=30 rpcport=443 rpcconnect=rpc.blockchain.info rpcsslciphers=TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH rpcsslcertificatechainfile=server.cert rpcsslprivatekeyfile=server.pem
|
Beep boop beep boop
|
|
|
Muhammed Zakir
|
|
November 03, 2014, 10:50:03 AM |
|
Oh I aready set it to rpc.blockchain.info, sorry if the other person didn't.
Here is everything on my bitcoin.conf, I looked for a pre-set one, and edited it removing what was useless, should I remove anything else? server=1 rpcuser=xxxxxx-xxx-xxxx-xxxx-xxxxxx rpcpassword=password rpctimeout=30 rpcport=443 rpcconnect=rpc.blockchain.info rpcsslciphers=TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH rpcsslcertificatechainfile=server.cert rpcsslprivatekeyfile=server.pem These are the important ones, others are optional: - rpcuser - Should be set to your wallet identifier. This is a 36 character random string which can be found on your wallet login page. - rpcpassword - Should be set to your main wallet password. If double encryption is enabled your second password will need to be set using walletpassphrase - rpcport - Should be set to 443 for https:// (when the -rpcssl is provided) or 80 for plain text http:// - rpcssl - Set to use a secure connection (Recommended) ~~MZ~~
|
|
|
|
Muhammed Zakir
|
|
November 03, 2014, 11:06:17 AM |
|
Have you enabled double encryption? If yes, you will have to change config file. -rpcpassword -- Should be set to your main wallet password. If double encryption is enabled your second password will need to be set using walletpassphrase You probably want to read 'Methods' in https://blockchain.info/api/json_rpc_api for API calls and its description. ~~MZ~~
|
|
|
|
KingZee (OP)
Sr. Member
Offline
Activity: 952
Merit: 452
Check your coin privilege
|
|
November 03, 2014, 11:22:21 AM |
|
Have you enabled double encryption? If yes, you will have to change config file. -rpcpassword -- Should be set to your main wallet password. If double encryption is enabled your second password will need to be set using walletpassphrase You probably want to read 'Methods' in https://blockchain.info/api/json_rpc_api for API calls and its description. ~~MZ~~ No I haven't :/ I don't understand, when I run the bitcoind with no method/command, It starts downloading random blockchain data, but when I send the getinfo command, it gives me this error
|
Beep boop beep boop
|
|
|
KingZee (OP)
Sr. Member
Offline
Activity: 952
Merit: 452
Check your coin privilege
|
|
November 03, 2014, 11:24:14 AM |
|
These are the important ones, others are optional:
-rpcuser - Should be set to your wallet identifier. This is a 36 character random string which can be found on your wallet login page. -rpcpassword - Should be set to your main wallet password. If double encryption is enabled your second password will need to be set using walletpassphrase -rpcport - Should be set to 443 for https:// (when the -rpcssl is provided) or 80 for plain text http:// -rpcssl - Set to use a secure connection (Recommended)
~~MZ~~
Maybe the ssl certificate is not there? Where can I find server.pem / server.cert
|
Beep boop beep boop
|
|
|
Muhammed Zakir
|
|
November 03, 2014, 11:46:16 AM |
|
Maybe the ssl certificate is not there? Where can I find server.pem / server.cert
You just want to write rpcssl. Try removing ssl related contents. From Blockchain.info , read this too: Security: This api is currently incompatible with two factor authentication and it must therefore be disabled. We HIGHLY recommend you enable double encryption which can be found on the My Wallet account details page.
If you will be accessing this API from a server with a static ip address is recommended you enable the IP Lock found in the Security Section of your My Wallet account.
P.S. Try: $ ./bitcoind -rpcconnect=rpc.blockchain.info -rpcport=443 -rpcssl -rpcuser=YourWalletIdentifier -rpcpassword=YourPassword getinfo
~~MZ~~
|
|
|
|
KingZee (OP)
Sr. Member
Offline
Activity: 952
Merit: 452
Check your coin privilege
|
|
November 03, 2014, 12:05:17 PM |
|
Maybe the ssl certificate is not there? Where can I find server.pem / server.cert
You just want to write rpcssl. Try removing ssl related contents. From Blockchain.info , read this too: Security: This api is currently incompatible with two factor authentication and it must therefore be disabled. We HIGHLY recommend you enable double encryption which can be found on the My Wallet account details page.
If you will be accessing this API from a server with a static ip address is recommended you enable the IP Lock found in the Security Section of your My Wallet account.
P.S. Try: $ ./bitcoind -rpcconnect=rpc.blockchain.info -rpcport=443 -rpcssl -rpcuser=YourWalletIdentifier -rpcpassword=YourPassword getinfo
~~MZ~~ Waaaaaaaah finally Thaanks!
|
Beep boop beep boop
|
|
|
Muhammed Zakir
|
|
November 03, 2014, 12:08:50 PM |
|
Waaaaaaaah finally [img ]http://puu.sh/cBz12/da258a6c55.png[/img] Thaanks! Congrats, friend! First time, I am getting involved in API related issue which I don't know anything. Because of you, I studied some! Thanks! ~~MZ~~
|
|
|
|
KingZee (OP)
Sr. Member
Offline
Activity: 952
Merit: 452
Check your coin privilege
|
|
November 03, 2014, 12:12:57 PM |
|
Waaaaaaaah finally [img ]http://puu.sh/cBz12/da258a6c55.png[/img] Thaanks! Congrats, friend! First time, I am getting involved in API related issue which I don't know anything. Because of you, I studied some! Thanks! ~~MZ~~ Well, I guess you know enough to help me out! I doubt I'd have ever thought of ssl settings before a loong search Thanks again and have a great day
|
Beep boop beep boop
|
|
|
Muhammed Zakir
|
|
November 04, 2014, 01:10:11 PM |
|
Help Me!!! Something wrong? Microsoft Windows [Version 6.1.7600] Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\usrname>cd "C:\Program Files\Bitcoin\daemon"
C:\Program Files\Bitcoin\daemon>bitcoind getinfo error: You must set rpcpassword=<password> in the configuration file: C:\Users\usrname\AppData\Roaming\Bitcoin\bitcoin.conf If the file does not exist, create it with owner-readable-only file permissions.
C:\Program Files\Bitcoin\daemon>
I can connect using: $ ./bitcoind -rpcconnect=rpc.blockchain.info -rpcport=443 -rpcssl -rpcuser=YourWalletIdentifier -rpcpassword=YourPassword getinfo The password is same but still not working! My config: rpcconnect=rpc.blockchain.info rpcport=443 rpcssl rpcuser=XXXXXX rpcpassword=XXXXX
~~MZ~~
|
|
|
|
KingZee (OP)
Sr. Member
Offline
Activity: 952
Merit: 452
Check your coin privilege
|
|
November 05, 2014, 12:24:41 AM |
|
Help Me!!! Something wrong? Microsoft Windows [Version 6.1.7600] Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\usrname>cd "C:\Program Files\Bitcoin\daemon"
C:\Program Files\Bitcoin\daemon>bitcoind getinfo error: You must set rpcpassword=<password> in the configuration file: C:\Users\usrname\AppData\Roaming\Bitcoin\bitcoin.conf If the file does not exist, create it with owner-readable-only file permissions.
C:\Program Files\Bitcoin\daemon>
I can connect using: $ ./bitcoind -rpcconnect=rpc.blockchain.info -rpcport=443 -rpcssl -rpcuser=YourWalletIdentifier -rpcpassword=YourPassword getinfo The password is same but still not working! My config: rpcconnect=rpc.blockchain.info rpcport=443 rpcssl rpcuser=XXXXXX rpcpassword=XXXXX
~~MZ~~ I think it's rpcssl, change it to rpcssl=1 Other than that, I'd check for extra spaces in the password maybe? When you're pasting it?
|
Beep boop beep boop
|
|
|
Muhammed Zakir
|
|
November 08, 2014, 09:13:47 AM |
|
I think it's rpcssl, change it to rpcssl=1
Other than that, I'd check for extra spaces in the password maybe? When you're pasting it?
Thanks! The config file wasn't 'read-only', so I changed it and also added '=1' , now it works! ~~MZ~~
|
|
|
|
KingZee (OP)
Sr. Member
Offline
Activity: 952
Merit: 452
Check your coin privilege
|
|
November 10, 2014, 11:40:32 PM |
|
I think it's rpcssl, change it to rpcssl=1
Other than that, I'd check for extra spaces in the password maybe? When you're pasting it?
Thanks! The config file wasn't 'read-only', so I changed it and also added '=1' , now it works! ~~MZ~~ No problem!
|
Beep boop beep boop
|
|
|
gadgetcoin
Newbie
Offline
Activity: 13
Merit: 0
|
|
November 11, 2014, 03:35:46 AM |
|
Many useful posts, thanks for this.
|
|
|
|
|