Reputation: 430
We are attempting to use the Survey Monkey API but are getting some odd results, when making a request through our app or with curl via command line:
curl -H 'Authorization:bearer XXXX' -H 'Content-Type: application/json'
https://api.surveymonkey.net/v2/user/get_user_details?api_key=YYYY
We get the following response:
<html>
<head>
<title>302 Found</title>
</head>
<body>
<h1>302 Found</h1>
The resource was found at /v2/user/get_user_details/?api_key=YYYY;
you should be redirected automatically.
</body>
</html>
So I've tried adding the -L paramter to my curl request so that it will follow redirects and get the following:
<h1>Service Requires SSL</h1>
Any ideas as to what we are doing wrong?
Upvotes: 1
Views: 526
Reputation: 1134
You are using a GET request to hit the end point, you need to modify it to provide a POST request. If it gives you an invalid scheme error, give it an empty JSON object (ie {}) in the request.
Upvotes: 2