{"id":22956895,"url":"https://github.com/marketcalls/flask-gmail-oauth","last_synced_at":"2026-04-24T23:31:31.366Z","repository":{"id":243563288,"uuid":"812767962","full_name":"marketcalls/flask-gmail-oauth","owner":"marketcalls","description":null,"archived":false,"fork":false,"pushed_at":"2024-06-10T06:31:16.000Z","size":15,"stargazers_count":0,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-17T04:38:21.052Z","etag":null,"topics":["alpinejs","daisyui","flask","gmail-api","gmail-oauth","tailwind"],"latest_commit_sha":null,"homepage":"https://www.marketcalls.in","language":"HTML","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/marketcalls.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":"2024-06-09T20:25:26.000Z","updated_at":"2024-06-10T06:31:19.000Z","dependencies_parsed_at":"2024-06-09T21:49:41.506Z","dependency_job_id":"ff45e696-0232-4f12-ab13-a5a0177eb796","html_url":"https://github.com/marketcalls/flask-gmail-oauth","commit_stats":null,"previous_names":["marketcalls/flask-mailer-test"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/marketcalls/flask-gmail-oauth","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marketcalls%2Fflask-gmail-oauth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marketcalls%2Fflask-gmail-oauth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marketcalls%2Fflask-gmail-oauth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marketcalls%2Fflask-gmail-oauth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marketcalls","download_url":"https://codeload.github.com/marketcalls/flask-gmail-oauth/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marketcalls%2Fflask-gmail-oauth/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32245006,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-24T13:21:15.438Z","status":"ssl_error","status_checked_at":"2026-04-24T13:21:15.005Z","response_time":64,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["alpinejs","daisyui","flask","gmail-api","gmail-oauth","tailwind"],"created_at":"2024-12-14T17:12:59.782Z","updated_at":"2026-04-24T23:31:31.352Z","avatar_url":"https://github.com/marketcalls.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Flask Gmail OAuth \n\nThis is a simple Flask application that uses OAuth 2.0 for Google login and Gmail API to send emails. The application includes three main pages: the email form, the email preview, and a confirmation page upon successful email sending.\n\n## Project Structure\n\n```\nFLASK MAILER TEST\n│\n├── templates\n│   ├── index.html\n│   ├── preview.html\n│   └── sent.html\n│\n├── .env\n├── .gitignore\n├── app.py\n└── requirements.txt\n```\n\n## Getting Started\n\n### Prerequisites\n\n- Python 3.x\n- A Google Cloud project with OAuth 2.0 credentials\n\n### Installation\n\n1. **Clone the repository**\n\n```bash\ngit clone https://github.com/marketcalls/flask-gmail-oauth.git\ncd flask-gmail-oauth\n```\n\n2. **Create and activate a virtual environment**\n\n```bash\npython3 -m venv venv\nsource venv/bin/activate  # On Windows use `venv\\Scripts\\activate`\n```\n\n3. **Install the dependencies**\n\n```bash\npip install -r requirements.txt\n```\n\n4. **Set up environment variables**\n\nCreate a `.env` file in the root directory with the following content:\n\n```plaintext\nSECRET_KEY=your_secret_key\nMAIL_DEFAULT_SENDER=your_email@gmail.com\nGOOGLE_CLIENT_ID=your_google_client_id\nGOOGLE_CLIENT_SECRET=your_google_client_secret\nOAUTH_ACCESS_TOKEN_URL=https://oauth2.googleapis.com/token\nOAUTH_AUTHORIZE_URL=https://accounts.google.com/o/oauth2/auth\nOAUTH_SCOPE=openid email https://www.googleapis.com/auth/gmail.send https://www.googleapis.com/auth/userinfo.email\nOAUTH_USERINFO_ENDPOINT=https://www.googleapis.com/oauth2/v3/userinfo\nOAUTH_JWKS_URI=https://www.googleapis.com/oauth2/v3/certs\nGMAIL_API_SEND_URL=https://www.googleapis.com/gmail/v1/users/me/messages/send\n```\n\n### Setting Up Google Cloud Project\n\n1. **Create a new project in Google Cloud Console**\n   - Go to the [Google Cloud Console](https://console.cloud.google.com/)\n   - Click on the project dropdown at the top left and select \"New Project\"\n   - Name your project and click \"Create\"\n\n2. **Enable Gmail API**\n   - Navigate to the [Gmail API](https://console.cloud.google.com/apis/library/gmail.googleapis.com)\n   - Click \"Enable\"\n\n3. **Create OAuth 2.0 credentials**\n   - Go to the [Credentials page](https://console.cloud.google.com/apis/credentials)\n   - Click on \"Create Credentials\" and select \"OAuth 2.0 Client IDs\"\n   - Set the \"Application type\" to \"Web application\"\n   - Add `http://127.0.0.1:5000` to \"Authorized JavaScript origins\"\n   - Add `http://127.0.0.1:5000/login/authorized` to \"Authorized redirect URIs\"\n   - Click \"Create\"\n   - Copy the \"Client ID\" and \"Client Secret\" to your `.env` file\n\n### Test Email IDs in Google Cloud Console\n\nYou can use the  test email IDs for testing the application in the oAuth Consent screen then\nscroll down to the Test users section and add the test users \n\n### Usage\n\n1. **Run the Flask application**\n\n```bash\npython app.py\n```\n\n2. **Access the application**\n\nOpen your web browser and go to `http://127.0.0.1:5000/login` to login to application using gmail\nand `http://127.0.0.1:5000/` to send email\n\n\n\n## License\n\nThis project is licensed under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarketcalls%2Fflask-gmail-oauth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarketcalls%2Fflask-gmail-oauth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarketcalls%2Fflask-gmail-oauth/lists"}