This API added calender events that have a google meet link embedded.
This API uses your Google credentials to create an Oauth Object which returns an url for authentication(/url)
. After authentication the URL redirect back to localhost which is captured and then processed to generate a token that is returned.
Using that token, we can set credentials in an Oauth Client (/auth)
using which we can then use the calendar API to create events using form data in JSON payload.
Every time an event is created in Google Calendar it is assigned an Meet Link automatically. That meet id can be fetched to create meet sessions as per need.
While adding events to Google Calendar other attendees can be also added thus enabling users to implement large scale group meetings by directly putting the events in the attendees calendars.
In order to use this API we need to generate Google credentials for calendar with Scope as a web app.
After you have received your credentials you need to change the last item that is "redirect_uris" to ["http://localhost:3000/auth"] so that when the authorisation is successful, google redirects to the localhost so that we can capture the access token and generated an oauth token.
Generate credentials.json for google calender using Google API Dashboard.
credentials.json
Follow the following steps to get a development env running.
First step will be to
npm install
And then execute
npm run dev
This API uses POST
and GET
requests to communicate and HTTP response codes to indenticate status and errors. All responses come in standard JSON. All requests must include a content-type
of application/json
and the body must be valid JSON.
200: Success
400: Bad request
401: Unauthorized
404: Cannot be found
50X: Server Error
100: Bad Request
110: Unauthorized
120: User Authenticaion Invalid
130: Parameter Error
140: Item Missing
150: Conflict
160: Server Error
You get: An url with link for O-Auth
.
You send: Your Access Token
You get: An O-Auth Token
.
You get: A form to create an event.
You send: Your Generated Token
You get: A list of Event-Objects
with Meet IDs.
You send: Your event creation parameters.
You get: An Event-Object
with Meet ID.
Request:
POST /createEvent HTTP/1.1
Accept: application/json
Content-Type: application/json
Content-Length: xy
{
"name":"name of the event",
"code":"any code to differentiate",
"date":"date of the event",
"stime":"starting time",
"etime":"ending time",
"attendees":{
"email":"attendee 1",
"email":"attendee 2"
},
"token":"generated token by going to /url"
}
See also the list of contributors who participated in this project.