0
我试图从v3 SurveyMonkey API发送消息。在此过程中,我使用从API需要以下模式:surveymonkey V3上的错误请求错误发送
POST /surveys/{id}/collectors
POST /collectors/{id}/messages
POST /collectors/{id}/messages/{id}/recipients/bulk
POST /collectors/{id}/messages/{id}/send
步骤1-3做工精细,但当我尝试发出send命令,我得到一个400错误请求错误。错误消息指出:
"The body provided was not a proper JSON string."
我在R中使用httr包来发送消息,如果有帮助。
u <- paste('https://api.surveymonkey.net/v3/collectors', collectorID, "messages", messageID, "send", sep="/")
h <- httr::add_headers(Authorization = token)
out <- httr::POST(u, config = h)
在我查看API文档时,并没有看到这个命令需要body。我错过了什么?