0

I am trying to retrieve the results of a completed Google survey. Using this url/resource per the google docs: I get the same error when attempting through the Google playground.

Get: https://www.googleapis.com/consumersurveys/v2/surveys/{my surveyurlID}/results.

I get the following error:

  "domain": "global",
  "reason": "INVALID_VALUE",
  "message": "Invalid Value supplied to API:

Authentication token is same as used to get the survey meta data ( which works).

Not sure what value is invalid. Any help appreciated.

DAK
  • 11
  • 1
  • Just to check: you are inserting your survey url id in the URL where it says `{my surveyurlID}` right? – TM. May 19 '16 at 16:47
  • Yes, I am including the correct surveyurlID. It works when returning the info about the survey. – DAK May 22 '16 at 22:32

1 Answers1

1

Unfortunately, the "try it now" widget doesn't support media downloads and we currently only provide the results as an excel file.

In order to get the results you'll need to specify a media type in your request. You can do so with the following endpoint:

GET https://www.googleapis.com/consumersurveys/v2/surveys/survey_id/results?alt=media

I would recommend using an OAuth 2 library to authenticate and then accessing the above endpoint.

We'll work on improving the documentation and clarifying this.

Thanks for bringing this to our attention.

TM.
  • 108,298
  • 33
  • 122
  • 127
  • The alt=media query parameter did the trick! Many thanks. Not sure how I would have figured that out. – DAK May 22 '16 at 22:33
  • what is the thought behind providing an api request result as an excel file? is there any common automation workflow pattern that necessitates the use of an API that benefits more from an excel format than pure json? – ryantuck Oct 26 '16 at 14:23