I am trying to use survey monkey APIs to pull data from a survey we launched last week but I keep getting error. I already registered an app in the developer portal. I added 'OAuth Redirect URL' in this format "https://api.surveymonkey.com/oauth/authorize?response_type=code&redirect_uri=https%3A%2F%2Fapi.surveymonkey.com%2Fapi_console%2Foauth2callback&client_id=SurveyMonkeyApiConsole&api_key=u366xz3zv6s9jje5mm3495fk" as mentioned in Survey Monkey OAuth developer Cheat Sheet (https://gist.github.com/api-admin/11302313). I also set scopes and marked app status as 'public'.
Here is my code to call an API .
import requests
url = "https://api.surveymonkey.net/v3/surveys/%s?api_key=%s" % (survey_id, YOUR_API_KEY)
s = requests.Session()
s.get(url).text
This is the error I get.
Out[41]: u'{"error": {"docs": "https://developer.surveymonkey.com/api/v3/#error-codes", "message": "The authorization token was not provided.", "id": "1010", "name": "Authorization Error", "http_status_code": 401}}'
What else needs to be done to download data using APIs? I am using SELECT annual plan subscription.