Hi Ant, Thanks so much for posting this. I've been trying for the past two weeks to use your httr script to import responses into Qualtrics but keep getting a 500 code. If you have a moment, do you see what might be off with this code? What's weird is that in the headers I keep getting content-type equal to 'application/json' despite specifying the type in the upload_file call. I've also tried using content_type and encode = "form" to get the content-type to be "text/csv" but it doesn't work. I would sincerely appreciate any help because I've been working on this nonstop but am stuck. vQualtrics_Upload <- POST(url = "https://az1.qualtrics.com/API/v3/surveys/SV_5je9vIJAZa7z8Tr/import-responses", add_headers('X-API-TOKEN' = vQualtrics_Token), body = list(surveyId = vQualtrics_SurveyID, file = upload_file("C:/Users/jackman/desktop/API/survey.csv", type = "text/csv")))
Already have an account? Login
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.
Sorry, we're still checking this file's contents to make sure it's safe to download. Please try again in a few minutes.
Sorry, our virus scanner detected that this file isn't safe to download.