{"id":13343721,"url":"https://github.com/distravantari/SMTP","last_synced_at":"2025-03-12T06:30:24.855Z","repository":{"id":80765870,"uuid":"85999874","full_name":"distravantari/SMTP","owner":"distravantari","description":"our own nodemailer oauth2","archived":false,"fork":false,"pushed_at":"2017-03-23T22:03:43.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-24T16:49:09.329Z","etag":null,"topics":["aouth2","gmail","nodemailer","smtp","zeit"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/distravantari.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-03-23T21:35:20.000Z","updated_at":"2017-03-23T22:00:56.000Z","dependencies_parsed_at":"2023-02-25T17:46:02.984Z","dependency_job_id":null,"html_url":"https://github.com/distravantari/SMTP","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/distravantari%2FSMTP","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/distravantari%2FSMTP/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/distravantari%2FSMTP/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/distravantari%2FSMTP/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/distravantari","download_url":"https://codeload.github.com/distravantari/SMTP/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243171348,"owners_count":20247876,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aouth2","gmail","nodemailer","smtp","zeit"],"created_at":"2024-07-29T19:31:57.353Z","updated_at":"2025-03-12T06:30:24.843Z","avatar_url":"https://github.com/distravantari.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SMTP\n## our own nodemailer oauth2\n\n### see example here: https://github.com/nodemailer/nodemailer/blob/master/examples/oauth2.js\n\n### first thing to do\n    1. npm i (to install all the dependencies on package.json)\n    2. and run npm start on your terminal\n\n### how to get your key etc?\n\tsee here: https://support.google.com/googleapi/answer/6158862\n\tstep:\n\t1. got to your console API google: https://console.developers.google.com/apis/library?project=poppins-142912\n\t2. create a project\n\t3. create crdential\n\t4. choose oAuth clientID\n\t5. click website service radio button\n\t6. and you got client ID and secret\n\t7. and go visit this link: https://developers.google.com/identity/protocols/OAuth2WebServer\n\n### use POSTMAN 2 times\n1. GET: https://accounts.google.com/o/oauth2/v2/auth?scope=https://mail.google.com/\u0026redirect_uri=https://nodemailer-nybgxooqyh.now.sh/oauth2callback\u0026response_type=code\u0026client_id=984872888741-8bo9b9ltdjd42cm45jd0gi1rlpj7uo5c.apps.googleusercontent.com\u0026access_type=offline\n\nredirect_uri \u0026 client_id : the same as your credential app redirect_uri \u0026 client_id\nit will response 404 page, but you just need the \"code\". save the code for the next step\n\n2. POST: https://www.googleapis.com/oauth2/v4/token?code=4/DF52Cg15pFjT_NzxjmgpjRSh4Qs8XaHOAPlz3n9Tsds\u0026client_id=984872888741-8bo9b9ltdjd42cm45jd0gi1rlpj7uo5c.apps.googleusercontent.com\u0026client_secret=JyMrCK9bOdVjz1ZQXoc5b-M3\u0026redirect_uri=https://nodemailer-nybgxooqyh.now.sh/oauth2callback\u0026grant_type=authorization_code\n\ncode is code, client_id is still the same, client_secret: you can see it at you credential too,\ntake the access_token from the response.\n\nand now you'll have all the things you need.\n\n\nthen the cool part, \n### you can have your very own smtp online with zeit.\n    simply follow this 3 steps:\n    1. npm i -g now\n    2. go to the file directory\n    3. now \"or\" /usr/local/Cellar/node/6.3.1/bin/now\n    4. wait till it done uploading, and save the url they gave you in the terminal\n    5. go to postman, and have fun\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdistravantari%2FSMTP","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdistravantari%2FSMTP","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdistravantari%2FSMTP/lists"}