I can't seem to get this simple curl API command to work. The original sample code is in HTML/Javascript. The I ran the code using Chrome and used developer tools to record the session. The html/js example worked fine. I copied the chrome network request URL and inserted it into the curl command with no luck. Here is what Chrome "More tools--> Developer tools --> Network --> Headers" gave me,
Request URL:https://api.betterdoctor.com/2016-03-01/doctors?location=37.773,-122.413,100&skip=2&limit=10&user_key=CODE_SAMPLES_KEY_9d3608187
Request Method:GET
Status Code:200 OK
Remote Address:52.9.169.107:443
Referrer Policy:no-referrer-when-downgrade
I tried to the following curl command and just cut and pasted the chrome results,
curl -k -H "Content-Type:application/json" -X GET https://api.betterdoctor.com/2016-03-01/doctors?location=37.773,-122.413,100&skip=2&limit=10&user_key=CODE_SAMPLES_KEY_9d3608187
I get the following error message,
{"meta":{"error":true,"message":"Missing user_key","error_code":1000,"http_status_code":401}}'skip' is not recognized as an internal or external command,
operable program or batch file.
'limit' is not recognized as an internal or external command,
operable program or batch file.
'user_key' is not recognized as an internal or external command,
operable program or batch file.
Any ideas what I might be doing wrong?
curl -k -H "Content-Type:application/json" -X GET "https://api.betterdoctor.com/2016-03-01/doctors?location=37.773,-122.413,100&skip=2&limit=10&user_key=CODE_SAMPLES_KEY_9d3608187"