Trivoh API End points

URL:


##Meetings
** We have two different servers, meeting server and application/website
** Both are separate, so we integrating them using jwt tokens.
** Meeting platform/server is on join.trivoh.com and app is on trivoh.com
** We must redirect users while using app from trivoh to meet.trivoh.com
** While joining or starting a meeting I'm redirecting users to meet.trivoh meanwhile
** I can send meet.trivoh url in response so you should redirect them
** Which method will be suitable for redirecting? let me know so i should use that.

##File Service /files/meeting/{id} [GET] { id its meeting id like 932034343 etc... [no need to use parenthesis near id] it will return all files available(not deleted yet) in this meeting (uploaded by any user of meeting) } /file/save [POST] { title its title of meeting (optional) user_id its required, can be null if user is not host or user_id is notavailable (you can get it from token of user in jitsi) meeting_id its id of meeting, available in token, or in URL of meeting delete send me this flag if user want to delete file after meeting ending, give option to user. if user select no send me 0, otherwise send me 1 file its file that you will send me. } /file/all [GET] { it will return all files available(not deleted yet) in all meetings (uploaded by any user of meeting) } /file/delete/{id} [DELETE] { id its file id like 1, 2 etc... [NOTE] This will delete file from database, so you should not show it to user. } #Agenda /agenda/meeting/{id} [GET] { id its meeting id like 932034343 etc... [no need to use parenthesis near id] it will return all agendas available in this meeting } /agenda/save [POST] { title its title of agenda (optional) details its detaiils of agenda user_id its required, can be null if user is not host or user_id is notavailable (you can get it from token of user in jitsi) meeting_id its id of meeting, available in token, or in URL of meeting show_time send me this flag if user want to show time to other users, 1 for yes and 0 for no duration its duration of agenda, send me in minutes(numeric). 10, 15 or any number. color its color of agenda send me hexa (select by user). like FFFFFF or any color, used by you later. notes optional( if user save notes for his own purpose) } /agenda/update/{id} [POST] { id its agenda id like 1, 2 etc... title its title of agenda (optional) details its detaiils of agenda show_time send me this flag if user want to show time to other users, 1 for yes and 0 for no duration its duration of agenda, send me in minutes(numeric). 10, 15 or any number. color its color of agenda send me hexa (select by user). like FFFFFF or any color, used by you later. notes optional( if user save notes for his own purpose) } /agenda/delete/{id} [DELETE] { id its agenda id like 1, 2 etc... [NOTE] This will delete agenda from database, so you should not show it to user. } /agenda/delete-all/{meeting_id} [DELETE] { meeting_id its meeting id like 932034343 etc... [NOTE] This will delete agendas from database, so you should not show it to user. } /agenda/generate/{meeting_id} [GET] { meeting_id its meeting id like 932034343 etc... reason its reason of generating agenda, e.g "Annual Meeting on software development" time its the total duration for the agenda in minutes [NOTE] This will generate agenda for meeting. } /agenda/import/{meeting_id} [POST] { meeting_id its meeting id like 932034343 etc... file its file that you will send in csv format It should have first row {title, details, duration}. download the sample file at [NOTE] This will import agenda from file to meeting. } /meeting/view/{meeting_id} [GET] [no need to use parenthesis near meeting_id] /meeting/join [POST] { name [name of user for joining meeting] meeting_id } /meeting/start/{meeting_id} [GET] [no need to use parenthesis near meeting_id] /meeting/participants/{meeting_id} [GET] [It will return names of participants who joined meeting] ##Auth /auth/register [POST] { name, email, phone, password, password_confirmation, country [id of country] } /auth/login [POST] { email, password } /auth/forget-password [POST] { email [user will receive otp in mail] } ## For registration email verification /auth/register/verification [POST] { email: [email of user] otp: [user will receive this in email] } ## Resend a registration verification email /auth/register/token/resend [POST] { email: [email of user] if successful email is sent to user it should return a success message if user was reverified successfully } ## for reset password otp /auth/verify-otp [POST] { otp [user will receive this in email] } /auth/reset-password [POST] { token, [this will be recieved from previous step while verifying otp] password password_confirmation } After login you'll get [user] object and [token]. (token will be in this format 1|kdsf98asdfjafkjklsdfj) (use only random token not this thing 1| its only counting like 1,2,3 ...) Use that token in further requests. Use this format for using token in headers. name is Authorization and value is Bearer [token] (There is space between Bearer and [token]) Authorization Bearer [token] /auth/user [GET] /auth/user [PUT] { name, phone, country, timezone, online_status [1/0] display switch box as per value too (1=online, 0 offline) currency currency id from /currency or [currency code like USD, PKR, EUR etc...] NOTE: check the supported currencies from /currency api } /auth/settings [PUT] { microphone, camera, lobby, screen_sharing, moderate, unmute_request, breakout_room [all will have 1/0 based like online_status and switch box also show accordingly] } /auth/password [PUT] { old_password, password, password_confirmation } /auth/avatar [PUT] { avatar [it should be image png or jpg] } /auth/logout [POST] /meetings [GET] /meetings/history [GET] [Its user history, list of all meeting that he joined] /meeting/my-personal-meeting [GET] /meeting/save [POST] { title [title of meeting optional] schedule [Yes/No] default No schedule_date [it should be hidden by default, if user select Yes in schedule then it should show up its format should be......] It will return meeting object including meeting ID start_time end_time timezone image Its image(png, jpeg or gif are supported), if user want to upload, optional. } ##Chat /chat/conversations [GET] { returns all conversations with users including last_message, time, user, avatar, online_status and user id. } /chat/contacts [GET] { returns list of available contacts to start chat with. it will return name and contact_user_id } /chat/contacts/upload [POST] { it will return array of data that you will upload, because it will work on backend so will not show any suitable response. } /chat/conversation/view/{id}?idtype=user [GET] { [Optional] idtype: can be user or conversation (if you want to get conversation by conversation id) it will return all messages between logged in user and other user who's id is being sent in GET request like /chat/contacts/1 } /chat/conversation/send/{id}?idtype=user [POST] { [Optional] idtype: can be user or conversation depeending on the id you are sending in url message attachment (image or any suitable file) poll (optional) [it will be question and array of options like ["option1", "option2", "option3"] poll { question, allow_multiple_choice: true/false, options: [ "option1", "option2", "option3" ] } id will be same that you will get from /chat/contacts api you shoudl just send id number like this /chat/contacts/1/send **** id should be 0 if you are not sure what to send. (while chatting with contact first time, or sending message from contacts page - search) } /user/ban [POST] { user_id send me user ID that you want to ban if successfully banned it will return 200 with logged in user object, if already banned it will unban that, so you can ban/unban user with sam eapi. PS: previous /chat/contacts/{id} api will return all messages in that conversation and an extra param as "iam_banned" either true or false, if its true you should now allow user to send message, disable chat box. it mean other user banned this user. } /chat/delete-message-locally [POST] { conversation_id send me conversation ID and message ID that you want to delete message_id it will delete message locally. } /chat/delete-message-globally [POST] { conversation_id send me conversation ID and message ID that you want to delete message_id it will delete message for both sender and receiver. You should this option only if from_id of message is equeal to logged in user ID, (so user will delete only if he sent that message.) } /chat/delete-conversation [POST] { conversation_id send me conversation ID that you want to delte this will delete conversation locally, not all users. } /chat/conversation/delete-messages [POST] { conversation_id send me conversation ID that you want to delete its message this will delete conversation message for the current users. } #Edit/Update message in any conversation /chat/edit/{cid}/{mid} [POST] { message attachment (image or any suitable file) id: its user id or contact ID as you already know. mid: its message id that you want to edit/update/modify. (Now all messages will contain edited parameter. if messages is edited it will be 1 otherwise null. You can display edited icon on edited messages) } /chat/search/{keyword} [GET] { keyword its text user want to search from his conversations it will return all messages(matching) it also contain conversation_id that you can use in } ##New API /chat/contacts/search/{keyword} [GET] { keyword its phone/email/personal_meeting_id that user want to search other users in trivoh it will return all users matching with phone/email } /meeting/random/start/{user_id} [GET] { user_id Its id of any user we are trying to call, (not id of user who is calling) it will return URL of current meeting link with jwt. } ##New API for notification with firebase cloud messaging /chat/notification-token/add [POST] { device_token its device token that you will get from firebase cloud messaging device_id its a random id you generated to identify device type its type of device, it can be android, ios, apn(for apn notification), web, desktop or others(default) [optional] it will return 200 if successfully registered. } /chat/notification-token/delete [POST] { device_token its device token that you send to backend or device_id that you sent it will delete token from database if the user try to delete it. } ///Update/// ## Load Conversation Messages without changing to seen /chat/conversation/load/{id}?idtype=user [GET] { id The id of the conversation idtype The type of id, it can be user or conversation [optional] it will return all messages between logged in user and other user who's id is being sent in GET request like /chat/contacts/1 } ## Create a conversation /chat/new/conversation [POST] { title The title of the conversation parent The id of the parent conversation [optional] it will return 200 if successfully registered. } ## Add users to a conversation /chat/user/add/{cid}/{uid} [GET] { cid The id of the conversation uid The id of the users to add to the conversation it will return 200 if successfully registered. } ## Remove users from a conversation /chat/user/remove/{cid}/{uid} [DELETE] { cid The id of the conversation uid The id of the users to remove from the conversation it will return 200 if successfully registered. } ## Rename a conversation /chat/conversation/rename/{cid} [POST] { cid The id of the conversation [in the parameter] title The new title of the conversation it will return 200 if successfully registered. } ## Change conversation avatar /chat/conversation/avatar/{cid} [POST] { cid The id of the conversation [in the parameter] image The new avatar image of the conversation it will return 200 if successfully registered. } ## Delete users messages in a conversation /chat/user/delete-message [POST] { conversation_id The id of the conversation it will return 200 if successfully registered. } ## Delete a conversation globally /chat/delete-conversation-globally [POST] { conversation_id send me conversation ID that you want to delte this will delete conversation globally, for all users. } ## Change user permission in a conversation /chat/user/permission [POST] { conversation_id The id of the conversation user_id The id of the user to change permission for permission The new permission of the user [0: member (default), 1: admin] it will return 200 if successfully registered. } ## Change conversation status to normal or archived or important /chat/conversation/change-status/{cid} [POST] { cid The id of the conversation [in the parameter] status The new status of the conversation [normal (default), archived, important] it will return 200 if successfully registered. } ## Create A Cluster /chat/cluster/new [POST] { title The title of the cluster description The description of the cluster rooms The rooms of the cluster seperated by comma e.g (room1,room2,room3) it will return 200 if successfully registered. } ## Get A Cluster /chat/cluster/{id} [GET] { id The id of the cluster it will return 200 if successfully registered. } ## Get All Clusters /chat/clusters [GET] { it will return 200 if successfully registered. } ## Get All Clusters List with last /chat/clusters/list [GET] { it will return 200 if successfully registered. } ## Get a cluster groups /chat/cluster/groups/{id} [GET] { id The id of the cluster it will return 200 if successfully registered. } ## Edit cluster info /chat/cluster/edit-info/{id} [POST] { id The id of the cluster title The new title of the cluster description The new description of the cluster it will return 200 if successfully registered. } ## Start conversation meeting Note: Only user admin can start meeting other can only join /meeting/conversation/join/{cid} [GET] { cid The id of the conversation it will return 200 if successfully registered. } ## Get meeting slug with UUID /meeting/getslug/{uuid} [GET] { uuid its uuid of meeting it will return the meeting id. } ## Get countries list /api/countries [GET] { it will return 200 with all list country. } ## Vote a poll in a message /chat/poll/vote/{pid}/{oid} [GET] { pid The id of the poll oid The id of the option to vote for if user already voted it will cancel the vote. it will return 200 if successfully registered. } ## Create a quick conversation /chat/conversation/quick [POST] { user_ids The id of the users to add to the conversation in array e.g [1,2,3] it will create a conversation with users names as the title NOTE: Don't send your id in the array } Under search contacts you can now search by email, phone and personal_meeting_id so that the users_ids can be send to create a quick conversation ## Get conversation call link /chat/call-link/{cid} [GET] { cid The conversation id of the room you are checking it returns the conversation call link } ## save transcript file to backend /meeting/transcription [POST] { room The meeting slug or uuid transcript The transcription conversation in text it will return 200 if successfully registered. } ## edit transcript file to backend /meeting/transcription/edit/{transcriptid} [POST] { transcriptid The id of the transcript to edit conversation The new transcription conversation in text it will return 200 if successfully registered. } ## view a transcription full /meeting/transcription/view/{transcriptid} [GET] { transcriptid The id of the transcript to view it will return 200 if successfully registered. } ## Get all meeting transcripts /meeting/transcription/{room} [GET] { room The meeting slug or uuid it will return 200 if successfully registered. } ## Delete a transcript /meeting/transcription/{transcriptid} [DELETE] { transcriptid The id of the transcript to delete it will return 200 if successfully registered. } ### Summary of a transcript ## Get all summary /meeting/summary [GET] { it will return 200 if successfully registered. } ## Get all meeting summary /meeting/summary/{room} [GET] { room The meeting slug or uuid it will return 200 if successfully registered. } ## Get a meeting summary /meeting/summary/view/{summaryid} [GET] { summaryid The id of the summary to view it will return 200 if successfully registered. } ## Edit a meeting summary transcription /meeting/summary/edit/{summaryid} [POST] { summaryid The id of the summary to edit transcripts The new transcription conversation in text it will return 200 if successfully registered. } ## Delete a meeting summary /meeting/summary/{summaryid} [DELETE] { summaryid The id of the summary to delete it will return 200 if successfully registered. } ## Recordings ## Get all meeting recordings /meeting/recording [GET] { it will return 200 if successfully registered. } ## Get a meeting recording /meeting/recording/{recordingid} [GET] { recordingid The id of the recording to view it will return 200 if successfully registered. } ## Delete a meeting recording /meeting/recording/{recordingid} [DELETE] { recordingid The id of the recording to delete it will return 200 if successfully registered. } ## Whiteboard ## Get all your person whiteboards /whiteboard [GET] { it will return 200 if successfully registered. } ## Get all your shared whiteboards /whiteboard/shared [GET] { it will return 200 if successfully registered. } ## Get a whiteboard /whiteboard/view/{whiteboardid} [GET] { whiteboardid The id of the whiteboard to view it will return 200 if successfully registered. } ## Get a meeting whiteboard /whiteboard/meeting/{meetingid} [GET] { meetingid The id of the meeting to view whiteboard it will return 200 if successfully registered. } ## Create a whiteboard /whiteboard [POST] { title The title of the whiteboard invite The email of the users to add to the whiteboard in string separated by comma e.g "test@mail.com,joe@mail.com" it will return 200 if successfully registered. } ## Invite users to a whiteboard /whiteboard/share/{whiteboardid} [POST] { whiteboardid The id of the whiteboard to share invite The email of the users to add to the whiteboard in string separated by comma e.g "test@mail.com,joe@mail.com" } ## Uninvite users to a whiteboard /whiteboard/unshare/{whiteboardid} [POST] { whiteboardid The id of the whiteboard to unshare invite The email of the users to remove from the whiteboard in string separated by comma } ## Delete a whiteboard /whiteboard/{whiteboardid} [DELETE] { whiteboardid The id of the whiteboard to delete it will return 200 if successfully registered. } ## Meeting Counts /meeting/counts [GET] { it will return 200 if successfully registered. } ## Meeting Delete /meeting/remove/{meetingid} [DELETE] { meetingid The id of the meeting to delete it will return 200 if successfully registered. } ### Meeting Participant ## Get all meeting invited participants /meeting/participant/{meetingid} [GET] { meetingid The id of the meeting to get participants it will return 200 if successfully registered. } ## Add a participant to a meeting /meeting/participant/{meetingid} [POST] { meetingid The id of the meeting to add participant name The name of the user to add to the meeting email The email of the user to add to the meeting role The role of the user to add to the meeting [CoHost (default), User] password The password of the user to add to the meeting [optional] it will return 200 if successfully registered. } ## Remind the participant to join a meeting /meeting/participant/remind/{meetingid} [POST] { meetingid The id of the meeting to remind participant email The email of the user to remind to join the meeting it will return 200 if successfully registered. } ## Remove a participant from a meeting invite /meeting/participant/{meetingid} [DELETE] { meetingid The id of the meeting to remove participant email The email of the user to remove from the meeting it will return 200 if successfully registered. } ## import participants to a meeting /meeting/participant/import/{meetingid} [POST] { meetingid The id of the meeting to import participants file The file of the participants to import to the meeting It should have first row {name, email, role, password (optional)}. download the sample file at it will return 200 if successfully registered. } ## Edit meeting info /meeting/edit/{meetingid} [POST] { meetingid The id of the meeting to update title The title of the meeting schedule The schedule of the meeting [Yes/No] schedule_date The schedule date of the meeting start_time The start time of the meeting end_time The end time of the meeting timezone The timezone of the meeting it will return 200 if successfully registered. } ## Get all supported currencies /currency [GET] { it will return 200 with all list of currencies. } ## Get a currency /currency/{currencyid} [GET] { currencyid The id of the currency to view it will return 200 if successfully registered. } ## Calendar APIS ## Get all calendar events /calendar [GET] { it will return 200 with all list of calendar events. } ## Get a calendar event /calendar/{eventid} [GET] { eventid The id of the calendar event to view it will return 200 if successfully registered. } ## Create a calendar event /calendar [POST] { title The title of the calendar event detail: The detail of the calendar event start_date: The start date of the calendar event start_timezone: The start timezone of the calendar event [optional] (user timezone will be used if not provided) end_date: The end date of the calendar event end_timezone: The end timezone of the calendar event [optional] (user timezone will be used if not provided) location: The location of the calendar event [optional] isOnline: The isOnline of the calendar event [1/0] attendees: The attendees of the calendar event [email separated by comma] [optional] it will return 200 if successfully registered. } ## Edit a calendar event /calendar/update/{eventid} [POST] { eventid The id of the calendar event to edit title The title of the calendar event detail: The detail of the calendar event start_date: The start date of the calendar event start_timezone: The start timezone of the calendar event [optional] (user timezone will be used if not provided) end_date: The end date of the calendar event end_timezone: The end timezone of the calendar event [optional] (user timezone will be used if not provided) location: The location of the calendar event [optional] isOnline: The isOnline of the calendar event [1/0] attendees: The attendees of the calendar event [email separated by comma] [optional] it will return 200 if successfully registered. } ## Delete a calendar event /calendar/{eventid} [DELETE] { eventid The id of the calendar event to delete it will return 200 if successfully registered. } ## Invite users to an event /calendar/invite/{eventid} [POST] { eventid The id of the calendar event to invite users attendees The attendees of the calendar event [email separated by comma] it will return 200 if successfully registered. } ## Uninvite a user to an event /calendar/uninvite/{eventid} [POST] { eventid The id of the calendar event to uninvite users attendees The attendees of the calendar event [email separated by comma] it will return 200 if successfully registered. } ## Integrate google calendar with Oauth /calendar/oauth/google [GET] { it will return 200 if successfully registered. } ## Callback for google calendar Oauth /calendar/oauth/google/callback [GET] { it will return 200 if successfully registered. } ## Get only google calendar events /calendar/google/events [GET] { it will return 200 with all list of google calendar events. } ## Get users google integrated accounts /calendar/google/accts [GET] { it will return 200 with all list of integrated accounts. } ## Integrate outlook calendar with Oauth /calendar/oauth/ms [GET] { it will return 200 if successfully registered. } ## Callback for outlook calendar Oauth /calendar/oauth/ms/callback [GET] { it will return 200 if successfully registered. } ## Get only outlook calendar events /calendar/ms/events [GET] { it will return 200 with all list of outlook calendar events. } ## Get users outlook integrated accounts /calendar/ms/accts [GET] { it will return 200 with all list of integrated accounts. } ## Get all integrated accounts /calendar/accounts [GET] { it will return 200 with all list of integrated accounts. } ## Get trivoh events only /calendar/trivoh/events [GET] { it will return 200 with all list of trivoh calendar events. } ///End of Update/// ##Delete user /auth/user/delete [DELETE] /auth/user/delete/confirm [DELETE] { otp: [user will receive this in email] } ## App versioning /version [GET] { it will return 200 with latest version of app. } /version [POST] { latest_build: [build number] app_version: [version of app] forced_latest_build: [build number] forced_app_version: [version of app] email: [email of mobile admin] password: [password of mobile admin] } ## Socket.IO const socket = io("https://api.trivoh.com", { auth: { token: `Bearer {token}` }, }); ## On User Connected with socket show all users socket.on("user_connected", (data) => { It will display all user conversations }); ## Send message to a user socket.emit("message", {room: "140", message: "Hello"}) // room is conversation id //If you want to send message with attachment, user the normal api it will still listen on socket /chat/conversation/send/{id} [POST] as written above ## Listening to messages // When you send message with emit, it will be received by other user and you too with this event socket.on("message", (data) => { It will respond to all new message }); ## Listening to message deleted socket.on("message-deleted", (data) => { It will return the info of deleted message }); ## Start conversation with a user socket.emit("start_conversation", {toUserId: "140"}) // toUserId is id of user you want to start conversation with ## Start call with a user socket.emit("call", {user_id: "140", conversation_id: "23", otherdatas...}) // user_id is id of user you want to call with, conversation_id is id of conversation you want to start call with ## Start call with groups socket.emit("group_call", {conversation_id: "23", otherdatas...}) // conversation_id is id of conversation you want to start call with both the users from the conversations listen for the response but the receiver also get notification data socket.on("call_started", (data) => { The response will be object which includes {link: "meeting link", user_id: "user you are on call with", conversation_id: "Conversation you are calling with" ...otherdatasent} }) ## All call response can be sent with this event be it call_started, call_ended, call_rejected, call_cancelled, call_accepted, call_declined socket.emit("call_response", {user_id: "140", conversation_id: "23", status: "call_accepted", otherdatas...}) // user_id is id of user you want to call with, conversation_id is id of conversation you are calling with ## It servers the same purpose as call_response as above /chat/callresponse [POST] { user_id: "140", conversation_id: "23", status: "call_accepted", otherdatas... } socket.on("call_response", (data) => { The response will be object which includes {link: "meeting link", user_id: "user you are on call with", ...otherdatasent} }) socket.on("conversation_call_status", (data) => { The response will be object which includes {call_status: [true or false 'Ongoing will be true not ongoing false'], current_call_id: [id of call if ongoing else null], ...other data for conversation} }) While other user should get the call with notification ## Listen for conversation started response socket.on("conversation_started", (data) => { You can use the data from here which }) ## Listen to when online status of user changes // When a user comes online or goes offline socket.on("user_status", (data) => { It will show {conversation_id, user_id, online_status [0 for offline, 1 for online]} }); ## Listen for poll vote socket.on("poll-vote", (data) => { The response will be object which includes message which has conversation_id, polls and options with votes }) ## Get Call URL by sending conversation id socket.emit("call_info", {conversation_id: "23", otherdatas...}) // conversation_id is id of conversation you want to start call with listen for response socket.on("call_info", (data) => { The response will be object which includes {link: "meeting link", ...otherdatasent} }) ## Listen to errors socket.on("error", (data) => { The response will be in error object e.g { error: "error message" } }) ## Listen to socket.on("connect_error", (error) => { if(error?.data?.type === "UnauthorizedError"){ // User is not logged in console.log(error.data.message); } }) #### TAGS DOCUMENTATION #### ## Get all tags /chat/tag/getall/conversation_id [GET] { conversation_id conversation ID that you want to get all tags it will return 200 with all list of tags. } ## Add a tag /chat/tag/add/conversation_id [POST] { conversation_id conversation ID that you want to create tag name tag name it will return 200 if successfully created. } ## Edit a tag /chat/tag/edit/tag_id [POST] { tag_id tag ID that you want to edit name tag name it will return 200 if successfully edited. } ## Delete a tag /chat/tag/delete/tag_id [POST] { tag_id tag ID that you want to delete it will return 200 if successfully deleted. } ## Add a tag to a message /chat/tag/message [POST] { message_id message ID that you want to add tag tag_id tag ID that you want to add it will return 200 if successfully added. } ## Get all tag messages /chat/tag/messages/tag_id [GET] { tag_id tag ID that you want to get all messages it will return 200 with all list of messages. } ## Update meeting settings /meeting/settings/{meeting_id} [PUT] { meeting_id meeting ID that you want to update settings camera_allowed 1/0 microphone_allowed 1/0 screen_sharing 1/0 lobby_enabled 1/0 host_enabled 1/0 guest_allowed 1/0 password password if you want (optional) it will return 200 if successfully updated. } listen for response socket.on("call_token", (data) => { The response will be object which includes { token: "token", room: "call room", server: "server url", } }) ## Daily Insight API /api/project/analytics/daily-insights [GET] { it will return 200 with all list of daily insights. }