I had followed the below instructions from qualtrics API guide to set up API export responses.
It was working for a couple months until very recently. The code is reproduced below.
# step 1
enddate=$(date -v -1H -u +"%Y-%m-%dT%H:%M:%SZ")
pid=$(curl --request POST \
--url https:///weblink]/API/v3/surveys/${survey_id}/export-responses \
--header 'Content-Type: application/json' \
--header "X-API-TOKEN: ${API_token}" \
--data "{\"format\": \"csv\", \"compress\":\"False\",\"useLabels\":\"True\", \"startDate\":\"${enddate}\"}" | /usr/local/bin/jq -r '.result.progressId')
echo ${pid}
wait
sleep 3
# step 2
fileid=$(curl --request GET \
--url https:///weblink]/API/v3/surveys/${survey_id}/export-responses/${pid} \
--header 'Content-Type: application/json' \
--header "X-API-TOKEN: ${API_token}" \
--data '{"format": "csv", "useLabels":"True"}' | /usr/local/bin/jq -r '.result.fileId')
echo ${fileid}
# step 3
curl --request GET \
--url https:///weblink]/API/v3/surveys/${survey_id}/export-responses/${fileid}/file \
--header 'Content-Type: application/json' \
--header "X-API-TOKEN: ${API_token}" \
--output ~/output.csv
The code was working and stopped working on the same day after I changed the time zone of my qualtrics account setting.
Step 1 still works, but step 2 throws an error:
`curl: (92) HTTP/2 stream 0 was not closed cleanly: PROTOCOL_ERROR (err 1)`
Help appreciated!