httpStatus":"400 - Bad Request".
My code works theoretically, but I believe its calling incorrectly and I am not sure why.
var option = {
async: true,
crossDomain: true,
url:"https://ousurvey.ca1.qualtrics.com/API/v3/surveys/SV_8dK8AKUFyAH8qyN/export-responses/",
method: "POST",
"headers": {
"X-API-TOKEN": "",
"Content-Type": "application/json",
"cache-control": "no-cache",
"Postman-Token": ""
},
processData: false,
data : '{"format":"csv"}',
muteHttpExceptions: true
};
var qUrl='https://ousurvey.ca1.qualtrics.com/API/v3/surveys/SV_8dK8AKUFyAH8qyN/export-responses/'
var getSurvey = UrlFetchApp.fetch(qUrl, option);
Currently I am just trying to pull the responses from a test survey I made, but have had no luck. I can get the two GET APIs to work by obtaining the IDs using POSTMAN, but the POST is being stubborn. I feel like I am missing something very obvious but I can't make any connections.
Best answer by jeNguyen
View original