Skip to content

Creating a JWT (JSON Web Token)

The JWT is generated according to the rules described in the section describing how to start the proctoring flow.

InformationIMPORTANT: JWT must be generated on the server side and passed to the frontend already formed.

Example JWT

JWT

json
 eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIxMjMyMTM0IiwibGFzdE5hbWUiOiJTbWl0aCIsImZpcnN0TmFtZSI6IkpvaG4iLCJsYW5ndWFnZSI6ImVuIiwiYWNjb3VudElkIjoxMjMsImFjY291bnROYW1lIjoiQ29ycG9yYXRlIHVuaXZlcnNpdHkiLCJleGFtSWQiOiJhMzg3NTYyMyIsImNvdXJzZU5hbWUiOiJQaHlzaWNzIiwiZXhhbU5hbWUiOiJGaW5hbCB0ZXN0IiwiZHVyYXRpb24iOjEyMCwic2NoZWR1bGUiOmZhbHNlLCJwcm9jdG9yaW5nIjoib2ZmbGluZSIsImlkZW50aWZpY2F0aW9uIjoicGFzc3BvcnQiLCJzdGFydERhdGUiOiIyMDE4LTAzLTI3VDAwOjAwOjAwWiIsImVuZERhdGUiOiIyMDE4LTAzLTMwVDEyOjU1OjAwWiIsInNlc3Npb25JZCI6IjgyODMzMWJkYTAyNSIsInNlc3Npb25VcmwiOiJodHRwczovL2dvLmJhbmFuYXMuY29tL29wZW50ZXN0I3Rlc3QvYjM4NzU2MjMifQ.GxcAcW0xGVDoM-gTtKHMol5kXNhTXuzAY3ekZD5CWgQ

Payload

json
{
  "userId": "1232134",
  "lastName": "Smith",
  "firstName": "John",
  "thirdName": "",
  "language": "en",
  "accountId": 123,
  "accountName": "Corporate university",
  "examId": "a3875623",
  "courseName": "Physics",
  "examName": "Final test",
  "userAgreementUrl": "https://school.org/eula",
  "duration": 120,
  "schedule": false,
  "auxiliaryCamera": false,
  "proctoring": "offline",
  "identification": "passport",
  "rules": {
    "allow_to_use_paper": false,
    "allow_to_use_calculator": false
  },
  "startDate": "2018-03-27T00:00:00Z",
  "endDate": "2018-03-30T12:55:00Z",
  "sessionId": "828331bda025",
  "sessionUrl": "https://go.bananas.com/opentest#test/b3875623",
  "exp": 1612994131,
  "biometricIdentification": {
    "enabled": true,
    "photo_url": "https://example.org/face.png",
    "skip_fail": false,
    "flow": "test-flow"
  },
  "scoreConfig": {
    "cheater_level": 80,
    "extra_user": 1.0,
    "user_replaced": 1.0,
    "absent_user": 1.0,
    "look_away": 1.0,
    "active_window_changed": 1.0,
    "forbidden_device": 1.0,
    "voice": 1.0,
    "phone": 1.0
  },
  "visibleWarnings": {
    "warning_extra_user_in_frame": false,
    "warning_timeout": false
  }
}

The complete list of payload fields is available in the Constructor Proctor API section, API parameters.