Skip to content

Latest commit

 

History

History
144 lines (104 loc) · 4.22 KB

README.md

File metadata and controls

144 lines (104 loc) · 4.22 KB

Project logo

meet api via calender api

Status GitHub Issues GitHub Pull Requests License


This API added calender events that have a google meet link embedded.

📝 Table of Contents

🧐 About

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.

🏁 Getting Started

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.

Prerequisites

Generate credentials.json for google calender using Google API Dashboard.

credentials.json

Installing

Follow the following steps to get a development env running.

First step will be to

npm install

And then execute

npm run dev

🎈 Usage

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.

Response Codes

Response Codes

200: Success
400: Bad request
401: Unauthorized
404: Cannot be found
50X: Server Error

Error Codes Details

100: Bad Request
110: Unauthorized
120: User Authenticaion Invalid
130: Parameter Error
140: Item Missing
150: Conflict
160: Server Error

/url

You get: An url with link for O-Auth.

/auth

You send: Your Access Token You get: An O-Auth Token.

/create

You get: A form to create an event.

/events

You send: Your Generated Token You get: A list of Event-Objects with Meet IDs.

/createEvent

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" 
}

⛏️ Built Using

✍️ Authors

See also the list of contributors who participated in this project.