ropensci / qualtRics

Download ⬇️ Qualtrics survey data directly into R!
https://docs.ropensci.org/qualtRics
Other
215 stars 70 forks source link

Error in `qualtrics_response_codes()`: #356

Open AmosBunde opened 2 months ago

AmosBunde commented 2 months ago

This is the warning: ! Qualtrics API reported a bad request error (400): Run rlang::last_trace() to see where the error occurred.

Code: qualtrics_data<- fetch_survey(surveyID = "IcanSeeYouThinkThisIsReal2024Sept12")

juliasilge commented 2 months ago

Hello @AmosBunde! There are two common issues that cause folks to run into this error.

The base URL you pass to the qualtRics package should either look like yourdatacenterid.qualtrics.com or like yourorganizationid.yourdatacenterid.qualtrics.com

curl --request GET \
--url https://XXX.qualtrics.com/API/v3/whoami \
--header 'x-api-token: YOURLONGAPITOKENHERE'

You would need to use your URL and your API token. Do you see anything in the results like:

Notice: Request proxied. For faster response times, use this host instead: