Welcome to Teachmint Video Service’s documentation!

The page describes how to handle room and user for teachmint video service. You can start using by making api calls to https://api.teachmint.com. You will need client_id and auth_key for making any api calls. If you are interested in using these api please write us at contact@teachmint.com.

Create or Modify Room

POST /add/room

Adds a new room for video conferencing

Example request:

POST /add/room  HTTP/1.1
User-Agent: python-requests/2.25.1
Accept-Encoding: gzip, deflate
Accept: */*
Connection: keep-alive
Content-Type: application/json

{
   "client_id": "teachmint",
   "auth_key": "W_7jNM1Cd-tqzinD4M3-9dMuQn4V3oMU0FB1HLD-JiFJqc9CVrrQzA",
   "room_id": "red-wizard",
   "name": "Red Wizard",
}

Example response:

HTTP/1.1 200 OK
Server: nginx/1.18.0 (Ubuntu)
Content-Type: application/json

{
    "status": true,
    "msg": "Room added sucessfully"
}
Request JSON Object
  • client_id (string) – Client Id

  • auth_key (string) – The Auth Key corresponding to Client Id

  • room_id (string) – The new room id you want to add “Eg: red-wizard”

Response JSON Object
  • status (boolean) – Whether room creation was sucessful

  • msg (string) – Specific message for response

Create or modify User

POST /add/user

Add/Update a user in a room for video. It return the url for live class. The url will be used for iframe. It also return wheter the class is running or not.

Example request:

POST /add/user  HTTP/1.1
User-Agent: python-requests/2.25.1
Accept-Encoding: gzip, deflate
Accept: */*
Connection: keep-alive
Content-Type: application/json

{
   "client_id": "teachmint",
   "auth_key": "W_7jNM1Cd-tqzinD4M3-9dMuQn4V3oMU0FB1HLD-JiFJqc9CVrrQzA",
   "room_id": "red-wizard",
   "user_id": "student_01",
   "name": "Anshuman",
   "type": 3
}

Example response:

HTTP/1.1 200 OK
Server: nginx/1.18.0 (Ubuntu)
Content-Type: application/json

{
    "status": true,
    "msg": "Room user added"
    "obj": {
        "url" : "https://video.teachmint.com"
        "live" : true
    }
}
Request JSON Object
  • client_id (string) – Client Id

  • auth_key (string) – The Auth Key corresponding to Client Id

  • room_id (string) – The room id we want to add user “Eg: red-wizard”

  • user_id (string) – The user id of user

  • name (string) – The name of user that will displayed

  • type (int) – 1 for host, 2 for two way student, 3 for viewers

Response JSON Object
  • status (boolean) – Whether user addition was sucessful

  • msg (string) – Specific message for response

  • obj.url (string) – Url to use with iframe

  • obj.live (live) – Whether room is live or not

Remove a room

POST /remove/room

Removes a room and all the users in that room

Example request:

POST /remove/room  HTTP/1.1
User-Agent: python-requests/2.25.1
Accept-Encoding: gzip, deflate
Accept: */*
Connection: keep-alive
Content-Type: application/json

{
   "client_id": "teachmint",
   "auth_key": "W_7jNM1Cd-tqzinD4M3-9dMuQn4V3oMU0FB1HLD-JiFJqc9CVrrQzA",
   "room_id": "red-wizard",
}

Example response:

HTTP/1.1 200 OK
Server: nginx/1.18.0 (Ubuntu)
Content-Type: application/json

{
    "status": true,
    "msg": "Room deleted sucessfully"
}
Request JSON Object
  • client_id (string) – Client Id

  • auth_key (string) – The Auth Key corresponding to Client Id

  • room_id (string) – The new room id you want to add “Eg: red-wizard”

Response JSON Object
  • status (boolean) – Whether room deletion was successful

  • msg (string) – Specific message for response

Get Recorded Videos

POST /get/videos

Get all the recorded videos

Example request:

POST /get/videos  HTTP/1.1
User-Agent: python-requests/2.25.1
Accept-Encoding: gzip, deflate
Accept: */*
Connection: keep-alive
Content-Type: application/json

{
   "client_id": "teachmint",
   "auth_key": "W_7jNM1Cd-tqzinD4M3-9dMuQn4V3oMU0FB1HLD-JiFJqc9CVrrQzA",
}

Example response:

HTTP/1.1 200 OK
Server: nginx/1.18.0 (Ubuntu)
Content-Type: application/json

{
    "status" : true,
    "obj" : [{
        "_id": "61436403912fe0d86d993d1d",
        "c": 1631806475.5102067,
        "u": 1631807316.8797545,
        "class_id": "shikho::red-wizard",
        "uuid": "de23c546-9290-4add-bd58-20cf8a1ed29b",
        "client": "shikho",
        "raw_path": "https://storage.googleapis.com/teachmint/video_lectures/de23c546-9290-4add-bd58-20cf8a1ed29b.webm",
        "processed_path": "https://storage.googleapis.com/teachmint/video_lectures/de23c546-9290-4add-bd58-20cf8a1ed29b.mp4",
        "thumbnail_path": "https://storage.googleapis.com/teachmint/video_lectures/de23c546-9290-4add-bd58-20cf8a1ed29b.png",
        "version": "1.0.0",
        "duration": 45,
        "status": "PROCESSED"
    }]
}
Request JSON Object
  • client_id (string) – Client Id

  • auth_key (string) – The Auth Key corresponding to Client Id

Response JSON Array of Objects
  • obj (jsonobj) – Details of Recorded Videos

Remove the user

POST /remove/user

Remove user from a room

Example request:

POST /remove/user  HTTP/1.1
User-Agent: python-requests/2.25.1
Accept-Encoding: gzip, deflate
Accept: */*
Connection: keep-alive
Content-Type: application/json

{
   "client_id": "teachmint",
   "auth_key": "W_7jNM1Cd-tqzinD4M3-9dMuQn4V3oMU0FB1HLD-JiFJqc9CVrrQzA",
   "room_id": "red-wizard",
   "user_id": "student_01",
}

Example response:

HTTP/1.1 200 OK
Server: nginx/1.18.0 (Ubuntu)
Content-Type: application/json

{
    "status": true,
    "msg": "User removed from room"
}
Request JSON Object
  • client_id (string) – Client Id

  • auth_key (string) – The Auth Key corresponding to Client Id

  • room_id (string) – The room id where you need to add user “Eg: red-wizard”

  • user_id (string) – The user_id we want’t to remove from room

Response JSON Object
  • status (boolean) – Whether user deletion was successful

  • msg (string) – Specific message for response

Remove Recorded Videos

POST /remove/videos

Remove recorded lectures

Example request:

POST /remove/videos  HTTP/1.1
User-Agent: python-requests/2.25.1
Accept-Encoding: gzip, deflate
Accept: */*
Connection: keep-alive
Content-Type: application/json

{
   "client_id": "teachmint",
   "auth_key": "W_7jNM1Cd-tqzinD4M3-9dMuQn4V3oMU0FB1HLD-JiFJqc9CVrrQzA",
   "video_uuids": ["de23c546-9290-4add-bd58-20cf8a1ed29b"]
}

Example response:

HTTP/1.1 200 OK
Server: nginx/1.18.0 (Ubuntu)
Content-Type: application/json

{
    "status": true,
    "obj": {
        "deleted": 1
    },
    "msg":"Lecture deleted"
}
Request JSON Object
  • client_id (string) – Client Id

  • auth_key (string) – The Auth Key corresponding to Client Id

  • video_uuids (stringarr) – uuids of video to delete

Response JSON Object
  • status (boolean) – Whether deletion was successful

  • msg (string) – Specific message for response

  • obj.deleted (string) – Specific message for response