Back

Why do I get this error 'User with your user id already exists'?

HTML5 Virtual Classroom strictly checks for unique user IDs in the Class Launch URL.

Here is an example Teacher and Student launch URLs that shows unique UserIDs for each user:

https://api.braincert.com/v2/getclasslaunch?apikey=XXXX&class_id=34315&userId=19&userName=Teacher&isTeacher=1&courseName=education&lessonName=tester&lessonTime=60&isRecord=0

https://api.braincert.com/v2/getclasslaunch?apikey=XXXX&class_id=34315&userId=20&userName=Student&isTeacher=0&courseName=education&lessonName=tester&lessonTime=60&isRecord=0

This issue may also happens when you have unique userIDs, but have double slash in the URL. This would make the API endpoint hard to read your UserID and you will see error 'User with your user id already exists'. You need to format the JSON output in your code, and remove the double slash.

It needs to look like this:


IMPORTANT:

Please note that the parameter userId is case-sensitive. If you pass this as UserID or userID, it will not work.



Author
BrainCert
Date Created
2017-01-19 15:07:21
Date Updated
2017-02-13 01:09:42
Views
579