{"id":20643811,"url":"https://github.com/anubiss10/chatbot-fastapi-googledrive","last_synced_at":"2026-04-13T05:45:25.153Z","repository":{"id":253083242,"uuid":"842406048","full_name":"anubiss10/Chatbot-FastAPI-GoogleDrive","owner":"anubiss10","description":"Chatbot Whatsapp with Google Drive","archived":false,"fork":false,"pushed_at":"2024-08-14T10:20:23.000Z","size":20,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-09T14:39:58.521Z","etag":null,"topics":["beginner","beginner-project","drive","fastapi","google-api","junior-developer","open-source","python","whatsapp-bot"],"latest_commit_sha":null,"homepage":"","language":"Python","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/anubiss10.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-08-14T09:34:11.000Z","updated_at":"2024-09-15T21:43:20.000Z","dependencies_parsed_at":"2024-08-14T11:20:25.932Z","dependency_job_id":"5f2d677b-7950-4b14-8307-457e6110fb46","html_url":"https://github.com/anubiss10/Chatbot-FastAPI-GoogleDrive","commit_stats":null,"previous_names":["anubiss10/chatbot-fastapi-googledrive"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/anubiss10/Chatbot-FastAPI-GoogleDrive","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anubiss10%2FChatbot-FastAPI-GoogleDrive","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anubiss10%2FChatbot-FastAPI-GoogleDrive/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anubiss10%2FChatbot-FastAPI-GoogleDrive/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anubiss10%2FChatbot-FastAPI-GoogleDrive/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anubiss10","download_url":"https://codeload.github.com/anubiss10/Chatbot-FastAPI-GoogleDrive/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anubiss10%2FChatbot-FastAPI-GoogleDrive/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31741541,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T05:13:27.074Z","status":"ssl_error","status_checked_at":"2026-04-13T05:13:25.150Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["beginner","beginner-project","drive","fastapi","google-api","junior-developer","open-source","python","whatsapp-bot"],"created_at":"2024-11-16T16:13:54.872Z","updated_at":"2026-04-13T05:45:25.105Z","avatar_url":"https://github.com/anubiss10.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ChatBot-Whatsapp-Python-FastApi\n\n**ChatBot-Whatsapp-Python-FastApi** es una aplicación que integra un chatbot con WhatsApp utilizando Python y FastAPI. Este proyecto facilita la comunicación automatizada con los usuarios de WhatsApp mediante un servicio de chatbot que maneja mensajes entrantes y salientes.\n\n## Características\n\n- **Integración con la API de WhatsApp Business:** Permite enviar y recibir mensajes a través de WhatsApp.\n- **Manejo de mensajes:** El bot puede responder a mensajes de texto e imágenes.\n- **Almacenamiento en Google Drive:** Las imágenes recibidas se pueden almacenar en Google Drive.\n- **Autenticación y manejo de tokens:** Usa credenciales de Google Drive para autenticación y manejo de tokens.\n\n## Requisitos\n\n- Python 3.7 o superior\n- FastAPI\n- Uvicorn\n- aiohttp\n- requests\n- google-auth\n- google-auth-oauthlib\n- google-api-python-client\n- python-dotenv\n\n## Instalación\n\n1. **Clona el repositorio:**\n\n```bash\ngit clone https://github.com/anubiss10/ChatBot-Whatsapp-Python-FastApi.git\ncd ChatBot-Whatsapp-Python-FastApi\n```\n2. **Crea un entorno virtual y actívalo:**\n\n  ```bash\npython -m venv .venv\nsource .venv/bin/activate  # En Windows: .venv\\Scripts\\activate\n```\n3. **Instala las dependencias:**\n\n```bash\npip install -r requirements.txt\n```\n4. **Copia el archivo .env.example a .env y completa con tus credenciales:**\n\n```bash\ncp .env.example .env\n```\nAsegúrate de proporcionar valores para VERIFY_TOKEN, TOKENADMIN, y la configuración para Google Drive (incluyendo credentials.json y token.json).\n\n## Uso\n**Ejecuta la aplicación con Uvicorn:**\n\n```bash\nuvicorn main:app --reload\n```\nEsto iniciará el servidor en http://127.0.0.1:8000.\n\n## Configura el webhook en la API de WhatsApp:\n\n## Asegúrate de que tu endpoint de webhook esté accesible desde la web y configura la URL de webhook en la API de WhatsApp Business.\n\n## Endpoints\n# GET /webhook\nVerifica la configuración del webhook. Responde con un desafío para confirmar la suscripción.\n\n** Parámetros:**\n```\nhub.mode: Modo de la suscripción.\nhub.verify_token: Token de verificación.\nhub.challenge: Desafío de verificación.\n```\nRespuesta:\n```\n200 OK: Verificación exitosa.\n403 Forbidden: Verificación fallida.\n```\n# POST /webhook\nManeja los mensajes entrantes desde WhatsApp. Procesa los mensajes de texto e imágenes, y los sube a Google Drive si es necesario.\n\nCuerpo de la solicitud:\n\n```json\n\n{\n  \"entry\": [\n    {\n      \"changes\": [\n        {\n          \"value\": {\n            \"messages\": [\n              {\n                \"type\": \"image\",\n                \"from\": \"PHONE_NUMBER\",\n                \"image\": {\n                  \"id\": \"MEDIA_ID\",\n                  \"caption\": \"CAPTION\"\n                }\n              }\n            ],\n            \"metadata\": {\n              \"phone_number_id\": \"PHONE_NUMBER_ID\"\n            }\n          }\n        }\n      ]\n    }\n  ]\n}\n```\nRespuesta:\n```\n200 OK: Mensaje procesado con éxito.\n403 Forbidden: Error al procesar el mensaje.\n```\n**Configuración de Google Drive**\nAsegúrate de tener las siguientes credenciales y archivos:\n\n**credentials.json**: Archivo de credenciales de Google Drive.\n**token.json**: Archivo de tokens de acceso y refresco.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanubiss10%2Fchatbot-fastapi-googledrive","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanubiss10%2Fchatbot-fastapi-googledrive","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanubiss10%2Fchatbot-fastapi-googledrive/lists"}