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

How can we complete pairing using bitpay-rest in prod in a Docker container? #103

Open mitchdowney opened 4 years ago

mitchdowney commented 4 years ago

As I understand it, in order to make Point of Sale requests, I need to run bitpay.js pair, go through the command line prompts, and eventually follow that link and press the approve button. That seems to make sense, but I'm trying to run bitpay-rest in a Docker container and don't know how to complete pairing inside it. Can it be done? And is it possible to automate those steps?

Update: After thinking about it more, it seems like I could run a setup script in my Dockerfile that runs through the pairing process, and I'll provide input to the interactive prompts somehow...but what about clicking the link with the pairing code? Can that be automated? Or is there a different approach I should be using to avoid the pairing code step entirely?