{"id":26575754,"url":"https://github.com/withdustin/geek-sms","last_synced_at":"2025-03-23T02:30:16.273Z","repository":{"id":57245665,"uuid":"156326843","full_name":"withDustin/geek-sms","owner":"withDustin","description":"SMS SDK for Javascript. Written in Typescript. Works on Node.js, browsers, React native. Supports eSMS.vn and more.","archived":false,"fork":false,"pushed_at":"2020-08-21T11:59:47.000Z","size":149,"stargazers_count":4,"open_issues_count":21,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-09T21:41:02.093Z","etag":null,"topics":["crm","esms","javascript","sms","typescript"],"latest_commit_sha":null,"homepage":"https://github.com/targeek/geek-sms","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/withDustin.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-11-06T04:40:43.000Z","updated_at":"2020-02-11T10:58:10.000Z","dependencies_parsed_at":"2022-08-24T16:31:11.277Z","dependency_job_id":null,"html_url":"https://github.com/withDustin/geek-sms","commit_stats":null,"previous_names":["targeek/geek-sms"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/withDustin%2Fgeek-sms","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/withDustin%2Fgeek-sms/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/withDustin%2Fgeek-sms/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/withDustin%2Fgeek-sms/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/withDustin","download_url":"https://codeload.github.com/withDustin/geek-sms/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245047976,"owners_count":20552429,"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":["crm","esms","javascript","sms","typescript"],"created_at":"2025-03-23T02:30:15.743Z","updated_at":"2025-03-23T02:30:16.248Z","avatar_url":"https://github.com/withDustin.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Geek SMS\n\n[![NPM](https://nodei.co/npm/geek-sms.png)](https://nodei.co/npm/geek-sms/)\n\n[![dependencies Status](https://david-dm.org/Targeek/geek-sms/status.svg)](https://david-dm.org/Targeek/geek-sms)\n[![devDependencies Status](https://david-dm.org/Targeek/geek-sms/dev-status.svg)](https://david-dm.org/Targeek/geek-sms?type=dev)\n![GeekSMS](https://img.shields.io/github/license/Targeek/geek-sms.svg)\n[![Coverage Status](https://coveralls.io/repos/github/Targeek/geek-sms/badge.svg)](https://coveralls.io/github/Targeek/geek-sms) [![Build Status](https://travis-ci.org/Targeek/geek-sms.svg?branch=master)](https://travis-ci.org/Targeek/geek-sms)\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)\n![npm type definitions](https://img.shields.io/npm/types/chalk.svg)\n\nA javascript library that supports multiple Vietnamese SMS service provider APIs.\n\n## Supported services\n\n- [x] [eSMS.vn](http://esms.vn)\n- [ ] [Vietguys.biz](https://www.vietguys.biz)\n- [ ] [Mobifone.vn](http://smsbrandname.mobifone.vn)\n- [ ] [Smarketing.vn](http://smarketing.vn/)\n\n\u003e If you really need a service above or another else, you can push us by creating an issue or make a PR. We are very welcome your contributions.\n\n# Getting Started\n\n## Installation\n\n```bash\nyarn add geek-sms\n// or\nnpm install --save geek-sms\n```\n\n## Usage\n\n```javascript\nimport { ESMS } from 'geek-sms'\n\nconst esms = new ESMS(\n  {\n    API_KEY: 'AN_API_KEY',\n    SECRET_KEY: 'A_SECRET_KEY',\n  },\n  {\n    loglevel: 'trace',\n  },\n)\n\nesms.getBalance()\nesms.getBrandNameList()\nesms.sendMessage(messageInfo)\n```\n\n# Running the tests\n\n## Run tests once\n\n```bash\nyarn test\n// or\nnpm run test\n```\n\n## Run tests in watch mode\n\n```bash\nyarn test:watch\n// or\nnpm run test:watch\n```\n\n# API Reference\n\n\u003e The documentation below is written in [ECMAScript 6](http://es6-features.org). If you have any issue please create an issue so we can help.\n\n## eSMS.vn\n\n### Initialize a new instance\n\n```javascript\nnew ESMS(\n  {\n    API_KEY, // Your API key.\n    SECRET_KEY, // Your secret key.\n  },\n  {\n    loglevel, // Could be one of 'trace', 'error', 'debug', 'info', 'silent'. Defaults to 'silent'.\n    baseUrl, // Overrides eSMS API URL (w/o trailing slash (`/`)).\n    useHttp, // Default API URL is https. Set this value to `true` if you want to use http.\n  },\n)\n```\n\nExample:\n\n```javascript\nimport { ESMS } from 'geek-sms'\n\nconst esms = new ESMS(\n  {\n    API_KEY: 'AN_API_KEY',\n    SECRET_KEY: 'A_SECRET_KEY',\n  },\n  {\n    loglevel: 'trace',\n    baseUrl: 'http://another-url.esms.vn/MainService.svc/json',\n  },\n)\n```\n\n### Get account balance\n\nReturns the remaining money in your account.\n\nExample:\n\n```javascript\nconst balance = await esms.getBalance()\n// =\u003e 4000000\n```\n\n### Get brand name list\n\nReturns the list of registered brand names.\n\nExample:\n\n```javascript\nconst brandnames = await esms.getBrandNameList()\n\n/* Resolves\n[ { name: 'QCAO_ONLINE', type: 2 },\n  { name: 'STORELAMMOC', type: 1 },\n  { name: 'STORELAMMOC', type: 2 } ]\n*/\n```\n\n### Send SMS message(s)\n\n```javascript\nconst messageInfo = {\n  phone: '0979000001', // A list of numbers to send SMS.\n  message: 'Test message jest',\n  type: ESMSMessageType,\n  brandName: 'STORELAMMOC',\n  sandBox: true,\n}\n\nawait esms.sendMessage(messageInfo)\n\n// with\nenum ESMSMessageType {\n  /** Advertising message using brand name (send to \u003e= 20 numbers). */\n  AdvertisingBrandName = 1,\n  /** Customer care message using brand name (send to 1 or more numbers). */\n  CustomerCareBrandName = 2,\n  /** For both advertising or customer care, using a static phone number to send. */\n  StaticNumber = 4,\n  /** Static 6394 number. Used for customer care or confirmation. */\n  StaticConfirmation = 6,\n  /** Use a static 10-digit number for customer care. Must registry message content first. */\n  Static10Digit = 8,\n}\n\n/* Resolves\n{\n  id: '871a70d0-0c6c-4b47-9664-5745603da2d0169',\n  phone: '0979000001',\n  message: 'Test message jest',\n  type: 2,\n  brandName: 'STORELAMMOC',\n  sandBox: true,\n}\n*/\n```\n\n# Contributing\n\nPlease read [CONTRIBUTING.md](https://github.com/Targeek/geek-sms/blob/master/CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests to us.\n\n# Authors\n\n- Dương Đỗ - [Targeek Solution](https://www.targeek.io)\n\nSee also the list of [contributors](https://github.com/Targeek/geek-sms/graphs/contributors) who participated in this project.\n\n# License\n\nThis project is licensed under the MIT License - see the [LICENSE.md](https://github.com/Targeek/geek-sms/blob/master/LICENSE.md) file for details\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwithdustin%2Fgeek-sms","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwithdustin%2Fgeek-sms","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwithdustin%2Fgeek-sms/lists"}