I'm attempting to follow the installation instructions, I can generate a keypair and pair with the server correctly, however when I attempt to make the first request using:
./node_modules/bitpay-rest/bin/bitpay.js request -T merchant -X post -R invoices -P '{"price": 1, "currency": "USD"}'
I receive:
Error: { error: 'Invalid signature' }
I get the same error when calling from the CLI, or when copying and pasting the code in the 'module' section of the readme.
Doing some debugging I can see that the error response is coming from calling GET: https://test.bitpay.com:443/tokens and the string being signed is simply: https://test.bitpay.com:443/tokens
I'm unsure how to debug this further. This is from a clean install, copying and pasting instructions from the readme.
I'm attempting to follow the installation instructions, I can generate a keypair and pair with the server correctly, however when I attempt to make the first request using:
./node_modules/bitpay-rest/bin/bitpay.js request -T merchant -X post -R invoices -P '{"price": 1, "currency": "USD"}'I receive:
Error: { error: 'Invalid signature' }I get the same error when calling from the CLI, or when copying and pasting the code in the 'module' section of the readme.
Doing some debugging I can see that the error response is coming from calling
GET: https://test.bitpay.com:443/tokensand the string being signed is simply:https://test.bitpay.com:443/tokensI'm unsure how to debug this further. This is from a clean install, copying and pasting instructions from the readme.