bitpay / node-bitpay-client

A Node.js module and command line client for interacting with BitPay's Cryptographically Secure API
102 stars 95 forks source link

Authentication fail with client #50

Closed flockonus closed 9 years ago

flockonus commented 10 years ago

Hey guys, having trouble to auth to test network here, tried the whole setup twice and saw the api docs

After trying a few options, I've installed with npm install -g bitpay which bitpay resolves to /Users/flockonus/.nvm/v0.10.25/bin/bitpay which looks right because I use nvm which has never been a problem.

Ran bitpay keygen which worked, I opened the link in my browser and added the key. A problem here is that I'd expect this to be all i'd such as in ssh

Running bitpay pair gives me no hint of what to do. While generating a new pair from the website, it doesn't help me make sense of what's going on either. It seems both the website and the client are looking for a code

$ bitpay whoami
Enter Key Password: 
Error: ID not associated with a BitPay user

I created a token from https://test.bitpay.com/api-tokens which was default to "Point-of-Sale" and used that token to sync the client, altho it seemed to have worked, the next steps didn't, neither trying to write an invoice from a script

$ bitpay pair -c znynVWs
Device paired!
$ bitpay whoami
Enter Key Password: 
Error: ID not associated with a BitPay user
ls ~/.bitpay
api.key     api.pub     config.json presets
braydonf commented 10 years ago

@flockonus After you have successfully paired with a Point-of-Sale facade token you should be able to create invoices, such as:

$ bitpay request -X POST -T pos -R invoices -P '{"price": 10.00, "currency": "USD"}'
flockonus commented 10 years ago

Hey @braydonf, I still don't get why the bitpay whoami command fail but the invoice was created successfully, and I could pay through Testenet!

braydonf commented 10 years ago

This is because the Point-of-Sale token that has been paired is limited only to that facade, and isn't associated with a user that would provide user capabilities.

tacticalchihuahua commented 9 years ago

@flockonus @braydonf closing this issue as the whoami command has been deprecated.