Persistent API Error: “The server had an error processing your request” from Qualtrics Integration | XM Community
Skip to main content
Question

Persistent API Error: “The server had an error processing your request” from Qualtrics Integration

  • December 5, 2025
  • 1 reply
  • 15 views

Forum|alt.badge.img

 

I am writing to request assistance with a recurring issue I am experiencing when calling the Chat Completions API from within a Qualtrics survey. The endpoint works correctly when I use the “Test” function inside Qualtrics, but when I preview or run the actual survey, I consistently receive the following error:

“The server had an error processing your request. Sorry about that!”

This occurs even when I use a very simple request with no piped text (for example, asking the model to output “Hello from Qualtrics”). My API key is valid, and I am including the correct authorization header:

 

Authorization: Bearer <MY_API_KEY> Content-Type: application/json

The request is sent to:

 

POST https://api.openai.com/v1/chat/completions

Using this minimal JSON body:

 

{ "model": "gpt-3.5-turbo", "messages": [ { "role": "system", "content": "You are a helpful assistant." }, { "role": "user", "content": "Say: Hello from Qualtrics." } ], "max_tokens": 60 }

Although the Test function in Qualtrics succeeds, the preview environment repeatedly returns the server error above, and no response content is returned to my survey.

 

Could you please advise on the possible cause?
Is this issue related to my account, billing status, usage limits, or an internal server error on the model endpoint?

This API integration is part of my PhD research experiment, and resolving this issue is essential for my study design. I would be very grateful for any guidance or support you can provide.

Thank you very much for your assistance.

 

1 reply

Forum|alt.badge.img+2
  • Qualtrics Employee
  • December 10, 2025

Hello, Faten
 

I see you're running into a frustrating issue where your Chat Completions API call succeeds in the Qualtrics 'Test' function but throws a generic "The server had an error processing your request. Sorry about that!" when you try to preview or run your survey.

The good news is that because it works in the test mode, the issue is very unlikely to be related to your API key validity, authorization headers, or billing status. Those types of problems usually cause consistent errors.

The Likely Cause

This generic server error, according to Qualtrics documentation and common scenarios, often points to an issue with the client-side environment or network restrictions that differ between the Test mode and the Survey Preview/Live environment.

The Qualtrics testing interface may allow certain API calls unrestricted, while the Survey Preview or End User environment might impose limitations such as:

  • Blocked cross-origin requests (CORS policies).

  • Firewall restrictions or other network interference.

  • Browser-specific security restrictions.

Recommended Troubleshooting Steps

Since your minimal JSON body and authorization appear correct and work in test mode, focus your efforts on environmental factors:

  1. Browser Check:

    • Try a different browser or use an incognito/private browsing mode to rule out browser extensions or cached data.

  2. Detailed Error Inspection:

    • Check your browser's Developer Tools (Network tab) while the failing request is made in Preview mode. Look for more detailed error messages or specific CORS issues.

  3. Network/IT Check:

    • Confirm that your survey environment allows outbound HTTPS requests to api.openai.com without being blocked or altered by a firewall.

  4. Qualtrics Environment Testing:

    • Clear your browser's cache and cookies and retry.

    • Test using a Qualtrics Anonymous link instead of the Preview mode to see if the error persists.

Next Steps

This issue is most likely caused by environment-specific network or security restrictions affecting API calls during survey preview or live-taking, not a billing nor account internal server error at the OpenAI endpoint.

If the problem remains unresolved after following these steps, you will need to get a deeper review, especially since this often involves client or network environment differences.

To properly troubleshoot this issue and securely access your account for a deeper review, please submit a ticket through your Customer Success Hub. This is the fastest and most secure way to get a personalized resolution:

➡️ https://support-portal.qualtrics.com/