-
Notifications
You must be signed in to change notification settings - Fork 812
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
403 Error requesting wallet admin API endpoints #679
Comments
I suspect you need a wallet Regular wallet commands require wallet tokens. For example, because you have exposed your API key and wallet token on github, I was able to make this request:
|
I have same configuration on my local and remote server, but remote server won't work on following command while local wallet server can list all wallets created: curl http://x:mykey@127.0.0.1:18334/wallet/ |
Do you have |
./bcoin/bin/spvnode --network=testnet --uri=http://localhost --api-key=mykey --spv Above is my start up arguments, no other configuration file. |
Ok that is interesting, I'll test on my end. You might want to take out your wallet API key form the github post as well ;-) Also pretty sure |
Ok I just tested your config and could not reproduce the results. If I also don't know why you have |
ack and one more unneeded parameter: |
@Leon-Zhang I'm going to close this issue for now. Feel free to reopen it if you have more questions, or you can always find us on Slack! |
I have removed --wallet-wallet-auth=true parameter and it is working ok on AWS EC2 now. |
Yep! Although if your API is exposed to a public endpoint, you probably do want to use |
Could you give a example config file which using wallet-admin-token and wallet-auth=true? |
~/.bcoin/bcoin.conf
~/.bcoin/regtest/wallet.conf
(See also #645) Examples - admin route - list all walletsNo api key: ❌
No token: ❌
Both: ✅
Create a wallet (no admin token needed)
Note the wallet Examples - wallet route - get wallet balanceWith wallet token
|
Thank you! I have made totally understand of your token usage. |
Hello, I have bcoin spvnode deployed on AWS EC2 server, but seems only wallet create api will work, wallet information API like
curl http://x:mykey@127.0.0.1:18334/wallet/
will return response header with
HTTP/1.1 403 Forbidden
Content-Type: application/json; charset=utf-8
Content-Length: 0
Date: Sun, 27 Jan 2019 02:57:29 GMT
Connection: keep-alive
But I already have 18334 port open, and wallet creation api works:
curl http://x:mykey@xx.xxx.xxx.xxx:18334/wallet/ccexchg3 -X PUT
{
"network": "testnet",
"wid": 5,
"id": "ccexchg3",
"watchOnly": false,
"accountDepth": 1,
"token": "05d0f03a5e210d79d6fcb138cb57bc218863b14d8e4b314e20eba6554946299b",
"tokenDepth": 0,
"master": {
"encrypted": false
},
"balance": {
"tx": 0,
"coin": 0,
"unconfirmed": 0,
"confirmed": 0
}
}
How to troubleshoot this?
Thanks.
The text was updated successfully, but these errors were encountered: