- Posts: 4
- Thank you received: 0
Ask the community, share ideas, and connect with other LimeSurvey users!
from limesurveyrc2api.limesurvey import LimeSurvey import requests import sys url = 'https://xxxxxxxxx/index.php/admin/remotecontrol' user = "admin" password = ******** sid = '345943' def export_responses2(skey,sid): try: response = requests.get(url, \ params={"method":"export_responses","params":[skey,sid,"csv"], "id":1}, \ headers={'content-type': 'application/json', 'connection': 'Keep-Alive'}) if response.status_code == 200: return response.content except : e = sys.exc_info()[0] print ( "Error: %s" % e ) api = LimeSurvey(url = url, username = user) api.open(password = password) skey = api.session_key print(export_responses2(skey, sid))
Please Log in to join the conversation.
Please Log in to join the conversation.
Please Log in to join the conversation.
Please Log in to join the conversation.