Author

Topic: JSON RPC help (Read 1812 times)

newbie
Activity: 13
Merit: 0
November 10, 2014, 11:35:46 PM
#18
Many useful posts, thanks for this.
sr. member
Activity: 910
Merit: 452
Check your coin privilege
November 10, 2014, 07:40:32 PM
#17
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! Smiley The config file wasn't 'read-only', so I changed it and also added '=1' , now it works! Smiley

   ~~MZ~~

Smiley No problem!
hero member
Activity: 560
Merit: 506
I prefer Zakir over Muhammed when mentioning me!
November 08, 2014, 05:13:47 AM
#16
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! Smiley The config file wasn't 'read-only', so I changed it and also added '=1' , now it works! Smiley

   ~~MZ~~
sr. member
Activity: 910
Merit: 452
Check your coin privilege
November 04, 2014, 08:24:41 PM
#15
Help Me!!! Grin Something wrong? Huh Sad

Code:
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= 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:
Code:
$ ./bitcoind -rpcconnect=rpc.blockchain.info -rpcport=443 -rpcssl -rpcuser=YourWalletIdentifier -rpcpassword=YourPassword getinfo

The password is same but still not working!

My config:

Code:
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?
hero member
Activity: 560
Merit: 506
I prefer Zakir over Muhammed when mentioning me!
November 04, 2014, 09:10:11 AM
#14
Help Me!!! Grin Something wrong? Huh Sad

Code:
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= 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:
Code:
$ ./bitcoind -rpcconnect=rpc.blockchain.info -rpcport=443 -rpcssl -rpcuser=YourWalletIdentifier -rpcpassword=YourPassword getinfo

The password is same but still not working!

My config:

Code:
rpcconnect=rpc.blockchain.info
rpcport=443
rpcssl
rpcuser=XXXXXX
rpcpassword=XXXXX

   ~~MZ~~
sr. member
Activity: 910
Merit: 452
Check your coin privilege
November 03, 2014, 08:12:57 AM
#13
Waaaaaaaah finally Cheesy

[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. Cheesy Because of you, I studied some! Smiley Thanks! Wink

   ~~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 Smiley Thanks again and have a great day
hero member
Activity: 560
Merit: 506
I prefer Zakir over Muhammed when mentioning me!
November 03, 2014, 08:08:50 AM
#12
Waaaaaaaah finally Cheesy

[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. Cheesy Because of you, I studied some! Smiley Thanks! Wink

   ~~MZ~~
sr. member
Activity: 910
Merit: 452
Check your coin privilege
November 03, 2014, 08:05:17 AM
#11
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:

Quote
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:

Code:
$ ./bitcoind -rpcconnect=rpc.blockchain.info -rpcport=443 -rpcssl -rpcuser=YourWalletIdentifier -rpcpassword=YourPassword getinfo

    ~~MZ~~

Waaaaaaaah finally Cheesy



Thaanks!
hero member
Activity: 560
Merit: 506
I prefer Zakir over Muhammed when mentioning me!
November 03, 2014, 07:46:16 AM
#10
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:

Quote
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:

Code:
$ ./bitcoind -rpcconnect=rpc.blockchain.info -rpcport=443 -rpcssl -rpcuser=YourWalletIdentifier -rpcpassword=YourPassword getinfo

    ~~MZ~~
sr. member
Activity: 910
Merit: 452
Check your coin privilege
November 03, 2014, 07:24:14 AM
#9

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
sr. member
Activity: 910
Merit: 452
Check your coin privilege
November 03, 2014, 07:22:21 AM
#8
Have you enabled double encryption? If yes, you will have to change config file.
Quote
-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. Smiley

   ~~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
hero member
Activity: 560
Merit: 506
I prefer Zakir over Muhammed when mentioning me!
November 03, 2014, 07:06:17 AM
#7
Have you enabled double encryption? If yes, you will have to change config file.
Quote
-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. Smiley

   ~~MZ~~
hero member
Activity: 560
Merit: 506
I prefer Zakir over Muhammed when mentioning me!
November 03, 2014, 06:50:03 AM
#6
Oh I aready set it to rpc.blockchain.info, sorry if the other person didn't.

Grin

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?

Quote
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~~
sr. member
Activity: 910
Merit: 452
Check your coin privilege
November 03, 2014, 06:44:00 AM
#5

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! Smiley

The config file isn't correct, rpc host must be set to rpc.blockchain.info, i.e., rpcconnect=rpc.blockchain.info .

Connecting using Bicoind:
Code:
$ ./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
stop
walletpassphrasechange - Disabled for security reasons
dumpprivkey - Disabled for security reasons
encryptwallet - 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?

Quote
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
hero member
Activity: 560
Merit: 506
I prefer Zakir over Muhammed when mentioning me!
November 03, 2014, 06:33:51 AM
#4
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! Smiley

The config file isn't correct, rpc host must be set to rpc.blockchain.info, i.e., rpcconnect=rpc.blockchain.info .

Connecting using Bicoind:
Code:
$ ./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
stop
walletpassphrasechange - Disabled for security reasons
dumpprivkey - Disabled for security reasons
encryptwallet - All blockchain.info wallets are encrypted by default. Password change is disabled for security reasons

P.S.(2) You probably want to read 'Methods' in https://blockchain.info/api/json_rpc_api for API calls and its description. Smiley

   ~~MZ~~
sr. member
Activity: 910
Merit: 452
Check your coin privilege
November 03, 2014, 05:50:20 AM
#3
Have you tried everything BC told? If not, do it! Smiley https://blockchain.info/api/json_rpc_api . Let me know what happens. By the way,I am not sn expert. Wink

P.S. Its not a good idea to use it as the private keys will be shared with the server. So it is better to stick eith Java wallet if you are sticking with BC wallet.

P.S.(2) See this topic too : https://bitcointalksearch.org/topic/rpcblockchaininfo-help-rpc-calls-622994

   ~~MZ~~

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:
Code:
$ bitcoind getinfo
error: couldn't parse reply from server

My ~/bitcoin/bitcoin.conf file:
Code:
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)?
hero member
Activity: 560
Merit: 506
I prefer Zakir over Muhammed when mentioning me!
November 02, 2014, 10:43:17 PM
#2
Have you tried everything BC told? If not, do it! Smiley https://blockchain.info/api/json_rpc_api . Let me know what happens. By the way,I am not sn expert. Wink

P.S. Its not a good idea to use it as the private keys will be shared with the server. So it is better to stick eith Java wallet if you are sticking with BC wallet.

P.S.(2) See this topic too : https://bitcointalksearch.org/topic/rpcblockchaininfo-help-rpc-calls-622994

   ~~MZ~~
sr. member
Activity: 910
Merit: 452
Check your coin privilege
November 02, 2014, 08:00:41 PM
#1
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.
Jump to: