Bash

  • This will work in Linux, Mac OS X, and other similar command lines in bash and many other shells.
  • You will need the curl utility installed.
  • First do
export APIKEY=xxx

    replacing xxx with your API key. Or you may replace $APIKEY with your API key in the command lines themselves.

  • Redirect the output to the jq utility (i.e. append | jq to the end of each command to get a fancier output).

 

List the box types

curl --get "https://nonlocalbox.wigner.hu/api/v1/listBoxTypes?apiKey=$APIKEY"

 

Invite a partner

curl --get "https://nonlocalbox.wigner.hu/api/v1/invitePartner?apiKey=$APIKEY&boxTypeID=1&inviteUserName=bob&boxName=ourPRbox"

 

List available boxes in which you are the inviter

curl --get "https://nonlocalbox.wigner.hu/api/v1/listBoxes?apiKey=$APIKEY"

 

Use a box

As Alice

curl --get "https://nonlocalbox.wigner.hu/api/v1/useBox?apiKey=$APIKEY&boxID=4&transactionID=202209140101&x=0"
As Bob
curl --get "https://nonlocalbox.wigner.hu/api/v1/useBox?apiKey=$APIKEY&boxID=4&transactionID=202209140101&y=0"