Hello,
I’m facing some issues with the result I’m trying to achieve. To summarize, I want to export the data of my survey in Excel format in an automated way (weekly email), not having to go to the survey and manually export it. I am trying to achieve this through Python using the Qualtrics API token. Please find here part of my code that is problematic:
API_TOKEN = 'MY_API_TOKEN'
SURVEY_ID = 'MY_SURVEY_ID'
DATA_CENTER = 'MY_DATA_CENTER'
BASE_URL = f'https://{DATA_CENTER}.qualtrics.com/API/v3/surveys/{SURVEY_ID}/export-responses/'
headers={
"Content-Type":"application/json",
"X-API-TOKEN": API_TOKEN
}
def test_baseurl():
try:
response = requests.get(BASE_URL, headers=headers)
response.raise_for_status()
print("URL is valid")
print("Response:", response.json())
except requests.exceptions.RequestException as e:
print(f"Error: {e}")
if __name__== "__main__":
test_baseurl()
The error I get is SSLCertVerificationError that indicates that there is an issue with the SSL certificate verification when attempting to connect to the Qualtrics API. Can you please help me resolve this issue?
Thank you,
Valentina