API not returning formats other than JSON?



I’m trying to export my (sandbox) surveyresponses via V4 API.

If I submit this, it works fine:


If I submit this (xml or csv), 


I get the following error:

Exception in thread “main” org.json.JSONException: A JSONObject text must begin with ‘{‘ at 1 [character 2 line 1]
at org.json.JSONTokener.syntaxError(JSONTokener.java:432)
at org.json.JSONObject.<init>(JSONObject.java:185)
at org.json.JSONObject.<init>(JSONObject.java:311)
at com.firstlink.utility.rest.GizmoInterface.resourceRead(GizmoInterface.java:53)
at com.firstlink.utility.client.GizmoClient.main(GizmoClient.java:81)

What am I doing wrong?

Thanks for any help.

Community Admin answered

    Hi Eric,

    I am not able to replicate what you are seeing. If you continue to run into trouble, please reach out to our support team so that they can get you sorted!


    Bri Hillmer
    Documentation Coordinator
    SurveyGizmo Customer Experience Team

    Community Admin commented
      • Thanks, Bri.
        My bad .. A hidden little function was trying to load the result into a json object. Your API works perfectly.
        Thanks very much for your help.

        • Thanks for following up Jeff and Eric. I’m sure “perfectly” is a little generous 😉

          Bri Hillmer
          Documentation Coordinator
          SurveyGizmo Customer Experience Team



      Question stats

      • Active
      • Views6999 times
      • Answers1 answer
      • Followers1 follower