Skip to content

Makes use of google calender api to generate google meet links. Has a user-friendly auth system with create event form

Notifications You must be signed in to change notification settings

SahilKr24/meet-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Makes use of google calender api to generate google meet links. Has a user-friendly auth system with create event form

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published