{"id":15134051,"url":"https://github.com/greensms-io/greensms-node","last_synced_at":"2026-04-22T10:00:56.657Z","repository":{"id":40754813,"uuid":"304923856","full_name":"greensms-io/greensms-node","owner":"greensms-io","description":"Node.js GREENSMS API client: SMS, Call, Voice, VK, WhatsApp, Viber","archived":false,"fork":false,"pushed_at":"2023-10-20T15:52:45.000Z","size":479,"stargazers_count":10,"open_issues_count":2,"forks_count":4,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-27T16:49:50.994Z","etag":null,"topics":["2fa","2fa-codes","2fa-security","2factor","call","calling","calling-codes","sms","sms-api","sms-messages","sms-service","viber","viber-api","vk","vk-api","voice","whatsapp-api"],"latest_commit_sha":null,"homepage":"https://api.greensms.ru","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/greensms-io.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":"2020-10-17T16:44:23.000Z","updated_at":"2025-10-28T23:06:19.000Z","dependencies_parsed_at":"2024-07-13T23:44:12.559Z","dependency_job_id":"f4b5fe94-d3af-4be0-9a54-9b71b3b74a46","html_url":"https://github.com/greensms-io/greensms-node","commit_stats":null,"previous_names":["greensms-ru/greensms-node"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/greensms-io/greensms-node","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/greensms-io%2Fgreensms-node","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/greensms-io%2Fgreensms-node/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/greensms-io%2Fgreensms-node/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/greensms-io%2Fgreensms-node/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/greensms-io","download_url":"https://codeload.github.com/greensms-io/greensms-node/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/greensms-io%2Fgreensms-node/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32130776,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-22T08:34:57.708Z","status":"ssl_error","status_checked_at":"2026-04-22T08:34:55.583Z","response_time":58,"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":["2fa","2fa-codes","2fa-security","2factor","call","calling","calling-codes","sms","sms-api","sms-messages","sms-service","viber","viber-api","vk","vk-api","voice","whatsapp-api"],"created_at":"2024-09-26T05:02:11.833Z","updated_at":"2026-04-22T10:00:56.632Z","avatar_url":"https://github.com/greensms-io.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# greensms-node\n\n[![NPM](https://nodei.co/npm/greensms.png?downloads=true\u0026stars=true)](https://nodei.co/npm/greensms/)\n\n![GitHub release (latest by date)](https://img.shields.io/github/v/release/greensms-ru/greensms-node)\n![node-current](https://img.shields.io/node/v/greensms)\n![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/greensms-ru/greensms-node/node.js.yml?branch=main)\n![Coveralls github](https://img.shields.io/coveralls/github/greensms-ru/greensms-node)\n[![Codacy Badge](https://app.codacy.com/project/badge/Grade/bda5e78fb51a4c24b2935d93369df539)](https://www.codacy.com/gh/greensms-ru/greensms-node/dashboard?utm_source=github.com\u0026utm_medium=referral\u0026utm_content=greensms-ru/greensms-node\u0026utm_campaign=Badge_Grade)\n\n## Documentation\n\nThe documentation for the GREENSMS API can be found [here][apidocs].\n\n## Installation\n\n```bash\nnpm install greensms --save\n```\n\n## Sample Usage\n\nCheck out these [code examples](examples) in JavaScript and TypeScript to get up and running quickly.\n\n```javascript\nconst GreenSMS = require(\"greensms\");\n// Register at my.greeensms.ru first\nconst client = new GreenSMS({ user: \"test\", pass: \"test\" });\n\nclient.sms\n  .send({\n    to: \"71231234567\",\n    txt: \"Message to deliver\",\n  })\n  .then((response) =\u003e {\n    console.log(\"Request ID: %s\", response.request_id);\n  })\n  .catch((err) =\u003e {\n    console.error(err);\n  });\n```\n\n### Environment Variables\n\n`greensms-node` supports credential storage in environment variables. If no credentials are provided following env vars will be used: `GREENSMS_USER`/`GREENSMS_PASS` OR `GREENSMS_TOKEN`.\n\n### Token Auth\n\n```javascript\nconst GreenSMS = require(\"greensms\");\n\nconst client = new GreenSMS({ token: \"token\" });\n\nclient.account\n  .balance()\n  .then((response) =\u003e {\n    console.log(\"Balance \", response.balance);\n  })\n  .catch((err) =\u003e {\n    console.error(err);\n  });\n```\n\n### Callback Example\n\n```javascript\nconst GreenSMS = require(\"greensms\");\n// Register at my.greeensms.ru first\nconst client = new GreenSMS({ user: \"test\", pass: \"test\" });\n\nfunction cb(err, response) {\n  console.error(\"Error \", err);\n  console.log(\"Response\", response);\n}\n\ngreenSmsInstance.account.balance(cb);\n```\n\n## Compatibility\n\n`greensms-node` is compatible with Node.js 12+ and tested until 19.x.\n\n\n## Methods\n\n- You can either use username/password combination or auth token to create an object with constructor\n- All methods support Promises, Async/Await and Callbacks.\n- Each API Function is available as `MODULE.FUNCTION()`\n- Parameters for each API can be referred from [here][apidocs]\n- Response keys by default are available in `snake_case`. If you want to use `camelCase`, then pass `camelCaseResponse: true`, in the constructor\n\n## Handling Exceptions\n\n- Exceptions for Promise are caught in the catch block.\n- For Async/Await, you can catch the error with `try/catch` block\n- Each Error consists of `error`, `code`, `message`, `errorType` fields and extends the default javascript `Error` class\n\n## Getting help\n\nIf you need help installing or using the library, please contact us: [support@greensms.ru](mailto:support@greensms.ru).\n\nIf you've instead found a bug in the library or would like new features added, go ahead and open issues or pull requests against this repo!\n\n## Contributing\n\nBug fixes, docs, and library improvements are always welcome. Please refer to our [Contributing Guide](CONTRIBUTING.md) for detailed information on how you can contribute.\nIf you're not familiar with the GitHub pull request/contribution process, [this is a nice tutorial](https://gun.io/blog/how-to-github-fork-branch-and-pull-request/).\n\n### Getting Started\n\nIf you want to familiarize yourself with the project, you can start by [forking the repository](https://help.github.com/articles/fork-a-repo/) and [cloning it in your local development environment](https://help.github.com/articles/cloning-a-repository/). The project requires [Node.js](https://nodejs.org) to be installed on your machine.\n\nAfter cloning the repository, install the dependencies by running the following command in the directory of your cloned repository:\n\n```bash\nnpm install\n```\n\nYou can run the existing tests to see if everything is okay by executing:\n\n```bash\nnpm test\n```\n\n[apidocs]: https://api.greensms.ru/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgreensms-io%2Fgreensms-node","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgreensms-io%2Fgreensms-node","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgreensms-io%2Fgreensms-node/lists"}