2

I am working on a project that requires an automated SSIS package to connect to SurveyMonkey data store via API to incrementally download survey results for the day or specified time period for custom reporting and low scoring task assignment.

Via OAuth I can collect a long lived access token, but due to the automated and infinite nature of my projects lifespan, I cannot manually initiate OAuth2 token refreshes or complete manual re-authentication cycles.

Is there another method to automatically export this data upon a scheduled request?

Additionally, for clarification for how long is a long lived access token valid? 60 days?

Rob
  • 869
  • 9
  • 11

2 Answers2

6

Miles from surveymonkey.com support responded to me with a great answer. I hope it can help someone down the line.

Hi Rob,

Currently our tokens should not expire - this is not guaranteed and may change in future, but we will send out an update well ahead of time if this does ever change. The token you receive on completion of OAuth lets you know how long the token will last for without user intervention, currently it returns 'null' in the 'expires_in' field.

There is no other automated way to schedule the data to be exported currently, however it sounds like our current setup should suit your needs

Rob
  • 869
  • 9
  • 11
0

In addition to Miles's reply, it is very straightforward to pull diffs from surveymonkey using modified dates. we keep "last sync" timestamp per-survey in our database, and update it after each successful data pull.
Use the REST api directly, or (if you're using PHP) try https://github.com/oori/php-surveymonkey. We run it in production.

*note: actually, you're interested in setting the start_modified_date option for the "getRespondentList" function. but in general - see the API docs, modified date filter is available in more functions.

oori
  • 5,533
  • 1
  • 30
  • 37