- Posts: 6
- Thank you received: 0
Ask the community, share ideas, and connect with other LimeSurvey users!
def add_participants(sessionkey, surveyID): req = urllib2.Request(url='https://umfrage.bkk-ruv.de/index.php/admin/remotecontrol',\ data='{\"method\":\"add_participants\",\"params\":[\"'+sessionkey+'\",\"'+surveyID+'\",\"test@mail.de\",\"Nachname\",\"Vorname\"],\"id\":1}') req.add_header('content-type', 'application/json') req.add_header('connection', 'Keep-Alive') try: f = urllib2.urlopen(req) myretun = f.read() j=json.loads(myretun) return j['result'] except : e = sys.exc_info()[0] print ( "<p>Error: %s</p>" % e )
data='{\"method\":\"add_participants\",\"params\":[\"'+sessionkey+'\",\"'+surveyID+'\",\"test@mail.de\",\"Nachname\",\"Vorname\"],\"id\":1}')