Getting preview survey link via API or any other methods. | XM Community
Skip to main content

Getting preview survey link via API or any other methods.

  • September 9, 2024
  • 9 replies
  • 184 views

Forum|alt.badge.img+1

Hi everyone!

I've been going through the API documentation but haven't been able to find a way to retrieve the "preview link" for a survey through the API. While I'm able to get the published survey link via API, I was wondering if anyone knows how to access the preview link without having to manually copy it from the Qualtrics dashboard.

Any insights or suggestions would be greatly appreciated!

Thank you!

9 replies

chackbusch
QPN Level 5 ●●●●●
Forum|alt.badge.img+22
  • QPN Level 5 ●●●●●
  • 415 replies
  • September 9, 2024

@hueythien.siah Can you describe your use case? I am not aware of an API which provides you the complete link, however, the schema is always the same and just contains the survey ID like…

https://qaz1.az1.qualtrics.com/jfe/preview/SV_3yENLyfFnpURpvn?Q_SurveyVersionID=current&Q_CHL=preview

So if you know the survey ID, you could just put it together.


Forum|alt.badge.img+1
  • Author
  • 4 replies
  • September 9, 2024

I see! Cause, i noticed that there was a preview ID within the URL which i thought was needed initially. When i used the schema that you provided, it also works which ultimately means that i do not need to add the preview ID within the URL. Using your schema definitely works! Thank you very much for you solution.  


chackbusch
QPN Level 5 ●●●●●
Forum|alt.badge.img+22
  • QPN Level 5 ●●●●●
  • 415 replies
  • September 9, 2024

@hueythien.siah Great. 🙂 Would appreciate if you would accept my comment as solution. Best, Christian.


Forum|alt.badge.img+1
  • Author
  • 4 replies
  • September 9, 2024

Let me clarify my scenario a bit further. I’ve been working with the APIs to create surveys, add blocks, and questions, which has been going well. However, I also want to be able to preview the survey on my end without any issues—preferably through the API.

The challenge I’ve encountered is that, even when I use the provided schema, it seems like I still need to have an active session with Qualtrics for the preview to work. This means that if I try to preview the survey directly within my project, it won’t function as expected.


Nam Nguyen
QPN Level 8 ●●●●●●●●
Forum|alt.badge.img+29
  • QPN Level 8 ●●●●●●●●
  • 1096 replies
  • September 9, 2024

Let me clarify my scenario a bit further. I’ve been working with the APIs to create surveys, add blocks, and questions, which has been going well. However, I also want to be able to preview the survey on my end without any issues—preferably through the API.

The challenge I’ve encountered is that, even when I use the provided schema, it seems like I still need to have an active session with Qualtrics for the preview to work. This means that if I try to preview the survey directly within my project, it won’t function as expected.

@hueythien.siah If you want to see how it look overall, use the CRUD API api.qualtrics.com/73d7e07ec68b2-get-survey

 

Or else, if you want to take a preview through API, use survey session APIs api.qualtrics.com/d0ea23036b269-start-a-new-session

Make sure to delete it without saving response:
api.qualtrics.com/50eb879ce23ed-delete-session-without-saving-response
Hope it helps


Forum|alt.badge.img+1
  • Author
  • 4 replies
  • September 10, 2024

Hi there, thanks for your suggestion! What I meant by "preview" is being able to actually access the preview link, similar to how it works in Qualtrics, where you can view the UI and see how the survey looks so far. I want to be able to view that page through the API. I don't think the "new-session" API will help in this case, since it only shows the question structure in the API response.


Nam Nguyen
QPN Level 8 ●●●●●●●●
Forum|alt.badge.img+29
  • QPN Level 8 ●●●●●●●●
  • 1096 replies
  • September 10, 2024

Hi there, thanks for your suggestion! What I meant by "preview" is being able to actually access the preview link, similar to how it works in Qualtrics, where you can view the UI and see how the survey looks so far. I want to be able to view that page through the API. I don't think the "new-session" API will help in this case, since it only shows the question structure in the API response.

@hueythien.siah Ohh, I understand what you want. API not gonna return any UI

“All new and existing surveys will have their preview links limited to Brand internal only by default. If the preview link is shared, users will be prompted to login to their Qualtrics account and will only be able to access the preview once they have successfully logged in.”

You can only switch the preview mode to public by accessing it and change it manually

Guess you have to actively logged-in


Forum|alt.badge.img+1
  • Author
  • 4 replies
  • September 11, 2024

Hi there. I assume that the Share preview cant be done via API? Also, is there a way to set the preview link to public only by default? Whenever i create a new survey, i want the preview to be accessed by the public. 


Nam Nguyen
QPN Level 8 ●●●●●●●●
Forum|alt.badge.img+29
  • QPN Level 8 ●●●●●●●●
  • 1096 replies
  • September 11, 2024

Hi there. I assume that the Share preview cant be done via API? Also, is there a way to set the preview link to public only by default? Whenever i create a new survey, i want the preview to be accessed by the public. 

@hueythien.siah As I know, you can’t change that default setting.
Here’s more info about it Preview Survey (qualtrics.com)