cURL Command Line Helpers for Windows

In this tutorial we will setup a few helpful utilities when using cURL from a command line terminal using a windows machine.

1. cURL request:

.\curl.exe -X POST -H 'Accept:application/json' -H 'X-API-Key:3Rt2HsLBzpbh50COmNeS9HuJhzQRTKs6MpLw7uhZbcd= Li9Z+kSdllv0VCJj9ccFksxcmCRsNmvVyKYT3Ba6MNA='


2. cURL request using an unquoted comma:

.\curl.exe -X POST ",2222222222222222222222222222222222222222222222222222222222222222" -H 'Accept:application/json' -H 'X-API-Key:3Rt2HsLBzpbh50COmNeS9HuJhzQRTKs6MpLw7uhZbcd= Li9Z+kSdllv0VCJj9ccFksxcmCRsNmvVyKYT3Ba6MNA='

the respond looks like this:


Receiving error message "Missing either apiKey and apiCredential or jwtToken."

If you receive the error message:

{"error":"Missing either apiKey and apiCredential or jwtToken."}curl: (6) Could not resolve host: Xy1SYXy1Kx0RGntmsrp9K "

There is either a lost letter when pasting the API key or a quoting issue in the Windows shell. The latter would also explain "Could not resolve host: Xy1SYXy1Kx0RGntmsrp9K"