MCPcopy
hub / github.com/vernu/textbee

github.com/vernu/textbee @v2.8.0 sqlite

repository ↗ · DeepWiki ↗ · release v2.8.0 ↗
658 symbols 1,656 edges 207 files 13 documented · 2%
README

textbee.dev - android sms gateway

textbee.dev is an open-source SMS gateway that enables users to send and receive SMS messages via a web dashboard or a REST API. Perfect for businesses, developers, and hobbyists who need a reliable and cost-effective way to automate SMS messaging.

  • Technology stack: React, Next.js, Node.js, NestJs, MongoDB, Android, Java
  • Link: https://textbee.dev

Features

  • Send & receive SMS messages via API & dashboard
  • Use your own Android phone as an SMS gateway
  • REST API for easy integration with apps & services
  • Send Bulk SMS with CSV file
  • Multi-device support for higher SMS throughput
  • Secure API authentication with API keys
  • Webhook support
  • Self-hosting support for full control over your data

Getting Started

  1. Go to textbee.dev and register or login with your account
  2. Install the app on your android phone from textbee.dev/download
  3. Open the app and grant the permissions for SMS
  4. Go to textbee.dev/dashboard and click register device/ generate API Key
  5. Scan the QR code with the app or enter the API key manually
  6. You are ready to send SMS messages from the dashboard or from your application via the REST API

Code Snippet: Few lines of code showing how to send an SMS message via the REST API

const API_KEY = 'YOUR_API_KEY';
const DEVICE_ID = 'YOUR_DEVICE_ID';

await axios.post(`https://api.textbee.dev/api/v1/gateway/devices/${DEVICE_ID}/send-sms`, {
  recipients: [ '+251912345678' ],
  message: 'Hello World!',
}, {
  headers: {
    'x-api-key': API_KEY,
  },
});

Code Snippet: Curl command to send an SMS message via the REST API

curl -X POST "https://api.textbee.dev/api/v1/gateway/devices/YOUR_DEVICE_ID/send-sms" \
  -H 'x-api-key: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "recipients": [ "+251912345678" ],
    "message": "Hello World!"
  }'

Receiving SMS Messages

To receive SMS messages, you can enable the feature from the mobile app. You can then fetch the received SMS messages via the REST API or view them in the dashboard. (Webhook notifications are coming soon)

Code Snippet: Few lines of code showing how to fetch received SMS messages via the REST API

const API_KEY = 'YOUR_API_KEY';
const DEVICE_ID = 'YOUR_DEVICE_ID';

await axios.get(`https://api.textbee.dev/api/v1/gateway/devices/${DEVICE_ID}/get-received-sms`, {
  headers: {
    'x-api-key': API_KEY,
  },
});

Code Snippet: Curl command to fetch received SMS messages

curl -X GET "https://api.textbee.dev/api/v1/gateway/devices/YOUR_DEVICE_ID/get-received-sms"\
  -H "x-api-key: YOUR_API_KEY"

Self-Hosting

Setting Up Database

  1. Install MongoDB on Your Server: Follow the official MongoDB installation guide for your operating system.
  2. Using MongoDB Atlas: Alternatively, you can create a free database on MongoDB Atlas. Sign up at MongoDB Atlas and follow the instructions to set up your database.

Firebase Setup

  1. Create a Firebase project.
  2. Enable Firebase Cloud Messaging (FCM) in your Firebase project.
  3. Obtain the Firebase credentials for backend use and the Android app.

Building the Android App

  1. Clone the repository and navigate to the Android project directory.
  2. Update the google-services.json file with your Firebase project configuration.
  3. Update every occurrence of textbee.dev with your own domain in the project.
  4. Build the app using Android Studio or the command line: bash ./gradlew assembleRelease

Building the Web

  1. Navigate to the web directory.
  2. Copy the .env.example file to .env: bash cp .env.example .env
  3. Update the .env file with your own credentials.
  4. Install dependencies: bash pnpm install
  5. Build the web application: bash pnpm build

Building the API

  1. Navigate to the api directory.
  2. Copy the .env.example file to .env: bash cp .env.example .env
  3. Update the .env file with your own credentials.
  4. Install dependencies: bash pnpm install
  5. Build the API: bash pnpm build

Hosting on a VPS

  1. Install pnpm, pm2, and Caddy on your VPS.
  2. Use pm2 to manage your Node.js processes: bash pm2 start dist/main.js --name textbee-api
  3. Configure Caddy to serve your web application and API. Example Caddyfile: textbee.dev { reverse_proxy /api/* localhost:3000 reverse_proxy /* localhost:3001 }
  4. Ensure your domain points to your VPS and Caddy is configured properly.

Dockerized env

Requirements:

  • Docker installed
  • After setting up Firebase, update your .env in web && api folder. bash cd web && cp .env.example .env \ && cd ../api && cp .env.example .env
  • Navigate to root folder and execute docker-compose.yml file.
    This will spin up web container, api container alongside with MongoDB and MongoExpress. TextBee database will be automatically created. bash docker compose up -d To stop the containers simply type bash docker compose down

Contributing

Contributions are welcome!

  1. Fork the project.
  2. Create a feature or bugfix branch from main branch.
  3. Make sure your commit messages and PR comment summaries are descriptive.
  4. Create a pull request to the main branch.

Bug Reporting and Feature Requests

Please feel free to create an issue in the repository for any bug reports or feature requests. Make sure to provide a detailed description of the issue or feature you are requesting and properly label whether it is a bug or a feature request.

Please note that if you discover any vulnerability or security issue, we kindly request that you refrain from creating a public issue. Instead, send an email detailing the vulnerability to contact@textbee.dev.

For support, feedback, and questions

Feel free to reach out to us at contact@textbee.dev or Join our Discord server

Extension points exported contracts — how you extend this code

GatewayApiService (Interface)
(no doc)
android/app/src/main/java/com/vernu/sms/services/GatewayApiService.java
ErrorBoundaryProps (Interface)
(no doc)
web/components/ErrorBoundary.tsx
Window (Interface)
(no doc)
web/lib/turnstile.ts
DeleteWebhookButtonProps (Interface)
(no doc)
web/app/(app)/dashboard/(components)/webhooks/delete-webhook-button.tsx
State (Interface)
(no doc)
web/hooks/use-toast.ts
ErrorBoundaryState (Interface)
(no doc)
web/components/ErrorBoundary.tsx
Session (Interface)
(no doc)
web/lib/auth.ts
WebhookCardProps (Interface)
(no doc)
web/app/(app)/dashboard/(components)/webhooks/webhook-card.tsx

Core symbols most depended-on inside this repo

cn
called by 143
web/lib/utils.ts
toast
called by 48
web/hooks/use-toast.ts
findOne
called by 38
api/src/users/users.service.ts
create
called by 17
api/src/users/users.service.ts
useToast
called by 16
web/hooks/use-toast.ts
register
called by 14
api/src/auth/auth.service.ts
whoAmI
called by 12
api/src/auth/auth.controller.ts
sendEmailFromTemplate
called by 9
api/src/mail/mail.service.ts

Shape

Function 226
Method 218
Class 179
Interface 29
Enum 6

Languages

TypeScript91%
Java9%

Modules by API surface

api/src/gateway/gateway.dto.ts28 symbols
api/src/auth/auth.service.ts23 symbols
api/src/webhook/webhook.service.ts20 symbols
api/src/gateway/gateway.service.ts20 symbols
api/src/auth/auth.controller.ts19 symbols
web/app/(app)/dashboard/(components)/message-history.tsx18 symbols
api/src/gateway/gateway.controller.ts17 symbols
android/app/src/main/java/com/vernu/sms/activities/MainActivity.java17 symbols
api/src/billing/billing.service.ts14 symbols
android/app/src/main/java/com/vernu/sms/activities/SMSFilterActivity.java12 symbols
api/src/auth/auth.dto.ts10 symbols
web/hooks/use-toast.ts9 symbols

Dependencies from manifests, versioned

@hookform/resolvers3.9.1 · 1×
@nest-modules/mailer1.3.22 · 1×
@nestjs/bull11.0.4 · 1×
@nestjs/cli11.0.14 · 1×
@nestjs/common11.1.9 · 1×
@nestjs/config4.0.2 · 1×
@nestjs/core11.1.9 · 1×
@nestjs/event-emitter3.0.1 · 1×
@nestjs/jwt11.0.2 · 1×
@nestjs/mapped-types2.1.0 · 1×
@nestjs/mongoose11.0.4 · 1×
@nestjs/passport11.0.5 · 1×

Datastores touched

(mongodb)Database · 1 repos

For agents

$ claude mcp add textbee \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact