-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Qualtrics API reported a bad request error (400) #339
Comments
Hello @ktmorris! There are two common issues that cause folks to run into this error.
You would need to use your URL and your API token. Do you see anything in the results like:
## put your survey ID here:
fetch_url <- qualtRics::generate_url(query = "fetchsurvey", surveyID = "SV_xxx")
raw_payload <- qualtRics:::create_raw_payload(
label = TRUE,
start_date = NULL,
end_date = NULL,
limit = NULL,
time_zone = NULL,
unanswer_recode = NULL,
unanswer_recode_multi = NULL,
include_display_order = TRUE,
include_questions = NULL,
breakout_sets = NULL
)
res <- qualtRics:::qualtrics_api_request("POST", url = fetch_url, body = raw_payload)
res$meta
#> $requestId
#> [1] "f52b2929-b24a-4c9d-88a6-e7c9d3ff660d"
#>
#> $httpStatus
#> [1] "200 - OK" Created on 2022-04-04 by the reprex package (v2.0.1) |
Similar issue - request was proxied. Once I used the other URL, all went well. |
Let us know if you have further questions! 🙌 |
While the all_surveys() function is working fine, fetch_survey() throws the following error:
` l <- fetch_survey(surveys$id[2])
Error in
qualtrics_response_codes()
:! Qualtrics API reported a bad request error (400):
• Please report this on https://github.com/ropensci/qualtRics/issues
Run
rlang::last_trace()
to see where the error occurred.`The text was updated successfully, but these errors were encountered: