PowerShell

  • This will work on Windows systems by default, and all other platforms (Linux, Mac OS X) on which PowerShell is available.
  • First do
    Set-Variable -Name "APIKEY" -Value "xxx"

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

  • The result JSON will be in the Content field of the output.
  • In legacy PowerShell (e.g. major version 5) you may have to add the -UseBasicParsing option to make it work.

 

List the box types

    Invoke-WebRequest -Uri "https://nonlocalbox.wigner.hu/api/v1/listBoxTypes?apiKey=$APIKEY"


Invite a partner

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

 

List available boxes in which you are the inviter

    Invoke-WebRequest -Uri "https://nonlocalbox.wigner.hu/api/v1/listBoxes?apiKey=$APIKEY"

 

Use a box

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