We have a created a survey and a mailling list. When we select the mailling list to create Personal Links via web-based Qualtrics platform (i.e. i.e. https://www.qualtrics.com/support/survey-platform/distributions-module/email-distribution/personal-links/ ), it worked perfectly.
But when we tried to use the Create Distribution API (i.e. https://api.qualtrics.com/api-reference/reference/distributions.json/paths/~1distributions/post ) to generate the list of personal links, we ran into unexpected error message saying the survey is not active.
Error message in response
{"meta":{"httpStatus":"400 - Bad Request","error":{"errorMessage":"Issue with parameter: surveyId, please fix and try again. Reason: Inactive survey specified.","errorCode":"CD_400_1"},"requestId":"4*******-****-****-****-**masked***b"}}
We wonder if we missed anything. (Note that we are using Research Core Contacts as we do not have XM Directory.)
Below is the related code we are using:
String qid = "SV_d****masked***j";
String qmid = "ML_8****masked***L";
String API_TOKEN = "y**************masked******************g";
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\\"surveyId\\":\\"" + qid + "\\""
+ ", \\"linkType\\":\\"Individual\\" "
+ ", \\"description\\":\\"distribution\\" "
+ ", \\"action\\":\\"CreateDistribution\\" "
+ ", \\"expirationDate\\":\\"2021-01-31 00:00:00\\" "
+ ", \\"mailingListId\\":\\"" + qmid + "\\" "
+ "}");
Request request = new Request.Builder()
.url("https://****.au1.qualtrics.com/API/v3/distributions")
.post(body)
.addHeader("x-api-token", API_TOKEN)
.build();
Response response = client.newCall(request).execute();
String responseString = response.body().string();
out.println(responseString + "
");
Can anyone help to shed some lights on this issues? 😥
Error Message about inactive Survey during Create Distribution API call
Sign up
Already have an account? Login
Welcome! To join the Qualtrics Experience Community, log in with your existing Qualtrics credentials below.
Confirm your username, share a bit about yourself, Once your account has been approved by our admins then you're ready to explore and connect .
Free trial account? No problem. Log in with your trial credentials to join.
No free trial account? No problem! Register here
Already a member? Hi and welcome back! We're glad you're here 🙂
You will see the Qualtrics login page briefly before being taken to the Experience Community
Login with Qualtrics
Welcome! To join the Qualtrics Experience Community, log in with your existing Qualtrics credentials below.
Confirm your username, share a bit about yourself, Once your account has been approved by our admins then you're ready to explore and connect .
Free trial account? No problem. Log in with your trial credentials to join. No free trial account? No problem! Register here
Already a member? Hi and welcome back! We're glad you're here 🙂
You will see the Qualtrics login page briefly before being taken to the Experience Community
Login to the Community
Welcome! To join the Qualtrics Experience Community, log in with your existing Qualtrics credentials below.
Confirm your username, share a bit about yourself, Once your account has been approved by our admins then you're ready to explore and connect .
Free trial account? No problem. Log in with your trial credentials to join.
No free trial account? No problem! Register here
Already a member? Hi and welcome back! We're glad you're here 🙂
You will see the Qualtrics login page briefly before being taken to the Experience Community
Login with Qualtrics
Welcome! To join the Qualtrics Experience Community, log in with your existing Qualtrics credentials below.
Confirm your username, share a bit about yourself, Once your account has been approved by our admins then you're ready to explore and connect .
Free trial account? No problem. Log in with your trial credentials to join. No free trial account? No problem! Register here
Already a member? Hi and welcome back! We're glad you're here 🙂
You will see the Qualtrics login page briefly before being taken to the Experience Community
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
