使用Survey Monkey REST API V3创建新响应

时间:2018-04-12 11:55:28

标签: surveymonkey

我正在尝试使用SurveyMonkey API创建新的回复,我正在关注SurveyMonkey提供的这个文档:https://developer.surveymonkey.com/api/v3/?shell#collectors-id-responses

以下是我的要求:

curl -i -X POST -H "Content-Type: application/json" -H "Authorization:bearer ACCESS_TOKEN" https://api.surveymonkey.com/v3/surveys/{suvey_id}/responses -d  '{"custom_variables":{"custvar_1": "one", "custvar_2": "two"},"response_status": "completed","custom_value": "custom identifier for the response","date_created": "2015-10-06T12:56:55+00:00","ip_address": "127.0.0.1", "pages": [{"id": "{page_id}","questions": [{"answers": [{"text": "Sample Text Response"}], "id": "{questions_id}"}, {"answers": [{"choice_id": "{choice_id}"}], "id": "{questions_id}"}]}]}'

我收到了404回复:

{"error": {"docs": "https://developer.surveymonkey.com/api/v3/#error-codes", "message": "There was an error retrieving the requested resource.", "id": "1020", "name": "Resource Not Found", "http_status_code": 404}}

我已经验证了“choice_id”,“questions_id”,“page_id”和“survey_id”的值,所有这些都是正确的但我仍然得到了404,我完全被这个问题困住了,对此有任何帮助我们将非常感谢。

谢谢!

0 个答案:

没有答案