{"id":20804431,"url":"https://github.com/sequencemedia/gmail-api","last_synced_at":"2026-04-19T16:02:15.170Z","repository":{"id":37936520,"uuid":"216398428","full_name":"sequencemedia/gmail-api","owner":"sequencemedia","description":"An async interface to the Gmail API by Google","archived":false,"fork":false,"pushed_at":"2026-04-14T03:06:11.000Z","size":7256,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-14T05:11:53.351Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/sequencemedia.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-10-20T17:15:51.000Z","updated_at":"2026-04-14T03:06:14.000Z","dependencies_parsed_at":"2023-10-15T04:55:17.489Z","dependency_job_id":"9946c1b8-627e-4b7b-8c9a-ad0cde39e2cd","html_url":"https://github.com/sequencemedia/gmail-api","commit_stats":null,"previous_names":[],"tags_count":383,"template":false,"template_full_name":null,"purl":"pkg:github/sequencemedia/gmail-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sequencemedia%2Fgmail-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sequencemedia%2Fgmail-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sequencemedia%2Fgmail-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sequencemedia%2Fgmail-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sequencemedia","download_url":"https://codeload.github.com/sequencemedia/gmail-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sequencemedia%2Fgmail-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32012787,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T20:23:30.271Z","status":"online","status_checked_at":"2026-04-19T02:00:07.110Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-11-17T19:09:22.105Z","updated_at":"2026-04-19T16:02:15.122Z","avatar_url":"https://github.com/sequencemedia.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @sequencemedia/gmail-api\n\nThe `@sequencemedia/gmail-api` package is an `async` interface to the Gmail API by Google.\n\n* It exports functions for querying and requesting Gmail messages, drafts, and labels\n* It must be authorised to do so by a human\n\n## Usage\n\n### Messages\n\n```javascript\nimport getGmail from '@sequencemedia/gmail-api/src/gmail'\n\nimport {\n  getMessages\n} from '@sequencemedia/gmail-api/src/gmail/messages/list'\n\nimport {\n  getMessage\n} from '@sequencemedia/gmail-api/src/gmail/messages'\n\nconst gmail = await getGmail()\nconst messageList = await getMessages(gmail, { max: 100 })\nconst messages = await Promise.all(messagesList.map((message) =\u003e getMessage(gmail, message)))\n\nmessages\n  .forEach((message) =\u003e {\n    console.log(message)\n  })\n```\n\nLabels and drafts follow the same pattern.\n\n### Labels\n\n```javascript\nimport getGmail from '@sequencemedia/gmail-api/src/gmail'\n\nimport {\n  getLabels\n} from '@sequencemedia/gmail-api/src/gmail/labels/list'\n\nimport {\n  getLabel\n} from '@sequencemedia/gmail-api/src/gmail/labels'\n\nconst gmail = await getGmail()\nconst labelList = await getLabels(gmail)\nconst labels = await Promise.all(labelsList.map((label) =\u003e getLabel(gmail, label)))\n\nlabels\n  .forEach((label) =\u003e {\n    console.log(label)\n  })\n```\n\nSee also messages and drafts.\n\n### Drafts\n```javascript\nimport getGmail from '@sequencemedia/gmail-api/src/gmail'\n\nimport {\n  getDrafts\n} from '@sequencemedia/gmail-api/src/gmail/drafts/list'\n\nimport {\n  getDraft\n} from '@sequencemedia/gmail-api/src/gmail/drafts'\n\nconst gmail = await getGmail()\nconst draftList = await getDrafts(gmail, { max: 100 })\nconst drafts = await Promise.all(draftsList.map((draft) =\u003e getDraft(gmail, draft)))\n\ndrafts\n  .forEach((draft) =\u003e {\n    console.log(draft)\n  })\n```\n\nSee also labels and messages.\n\n\n## Credentials\n\nYou must supply _public_ or _internal_ `oAuth` 2.0 credentials for an application registered with the [Google developer console](https://console.developers.google.com) which has the Gmail API enabled, and a credentials token authorising the application to access a Gmail account you control. (The credentials identify your application. The credentials token confirms that your application is authorised to access your Gmail account.)\n\n## Configuration\n\nCredentials and credentials tokens can be supplied either as environment variables or as arguments on the command line.\n\n### Environment variables\n\nYou can supply paths to files on the file system:\n\n```bash\nCREDENTIALS_PATH\nCREDENTIALS_TOKEN_PATH\n```\n\nOr, you can supply JSON:\n\n```bash\nCREDENTIALS_JSON\nCREDENTIALS_TOKEN_JSON\n```\n\nCredentials and credentials tokens supplied as environment variables containing JSON are _never written to the file system_.\n\n### Command-line arguments\n\nSimilarly, you can supply paths to files on the file system:\n\n```bash\n--credentials-path\n--credentials-token-path\n```\n\nOr, you can supply JSON:\n\n```bash\n--credentials-json\n--credentials-token-json\n```\n\nAgain, credentials and credentials tokens supplied as command-line arguments containing JSON are _never written to the file system_.\n\n### Precedence\n\n* Command-line arguments supersede environment variables (so if you have supplied both, the command line arguments will be used)\n* JSON supersedes paths (so if you have supplied both, the JSON will be used, and nothing will touch the file system)\n\n## Privacy Policy\n\nThe `@sequencemedia/gmail-api` package does not store any data from Gmail, nor does it gather usage data.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsequencemedia%2Fgmail-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsequencemedia%2Fgmail-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsequencemedia%2Fgmail-api/lists"}