AKishchak / express-gcontacts

Simple Google Contacts integration to the NodeJS app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

REST API for Google Contacts

This projects implements API for your contacts and provide an ability to sync your Google Contacts via 3rd party API.

SignIn with your Google Account and discover following endpoints:

Home page with GoogleOauth prompt

GET / 

REST API

Get all users in the system

GET /users 

Get all contacts for specific user

GET /users/:userId/contacts

Create user contact

POST /users/:userId/contacts 
{
    "name": "My New Contact",
    "phone": ["+1099999999999", "+1022222222222"],
    "email": ["contact@gmail.com"],
}

Update existing contact (Payload is the same as for create)

PUT /users/:userId/contacts/:contactId

Remove user contact

DELETE /users/:userId/contacts/:contactId

Import all contacts from GoogleAPI

POST /users/:userId/sync-contacts

TO RUN THE APP

  • Fill the .env file with config of your application, registered in Google Cloud Platform
  • Run the MongoDB instance, use docker-compose.yml to simplify this action
  • Run the app: npm run start
  • Discover the app it on localhost:3000 port

About

Simple Google Contacts integration to the NodeJS app


Languages

Language:JavaScript 95.4%Language:HTML 2.7%Language:CSS 1.9%