{"id":22576605,"url":"https://github.com/ndolestudio/httpsms-node","last_synced_at":"2025-04-10T17:12:59.395Z","repository":{"id":218377050,"uuid":"746226203","full_name":"NdoleStudio/httpsms-node","owner":"NdoleStudio","description":"Node client for the httpSMS API https://httpsms.com","archived":false,"fork":false,"pushed_at":"2025-01-01T10:02:23.000Z","size":42,"stargazers_count":4,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-20T22:09:32.916Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/NdoleStudio.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license","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-01-21T12:59:16.000Z","updated_at":"2025-01-01T10:02:20.000Z","dependencies_parsed_at":"2024-03-01T20:42:48.137Z","dependency_job_id":"735153be-caa8-485e-b612-a4424ce86dcb","html_url":"https://github.com/NdoleStudio/httpsms-node","commit_stats":null,"previous_names":["ndolestudio/httpsms-node"],"tags_count":2,"template":false,"template_full_name":"sindresorhus/node-module-boilerplate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NdoleStudio%2Fhttpsms-node","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NdoleStudio%2Fhttpsms-node/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NdoleStudio%2Fhttpsms-node/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NdoleStudio%2Fhttpsms-node/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NdoleStudio","download_url":"https://codeload.github.com/NdoleStudio/httpsms-node/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248261908,"owners_count":21074225,"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":[],"created_at":"2024-12-08T04:07:20.915Z","updated_at":"2025-04-10T17:12:59.240Z","avatar_url":"https://github.com/NdoleStudio.png","language":"TypeScript","readme":"# httpsms-node\n\n[![Version](https://img.shields.io/npm/v/httpsms.svg)](https://www.npmjs.org/package/httpsms)\n[![Build](https://github.com/NdoleStudio/httpsms-node/actions/workflows/main.yml/badge.svg)](https://github.com/NdoleStudio/httpsms-node/actions/workflows/main.yml)\n[![GitHub contributors](https://img.shields.io/github/contributors/NdoleStudio/httpsms-node)](https://github.com/NdoleStudio/httpsms-node/graphs/contributors)\n[![GitHub license](https://img.shields.io/github/license/NdoleStudio/httpsms-node?color=brightgreen)](https://github.com/NdoleStudio/httpsms-node/blob/master/LICENSE)\n[![Downloads](https://img.shields.io/npm/dm/httpsms.svg)](https://www.npmjs.com/package/httpsms)\n\nThis library provides a server side client for the [httpSMS](https://httpsms.com/) API to help you send and receive SMS messages from your Node.js applications in TypeScript or JavaScript.\n\n## Install\n\n```sh\npnpm install httpsms\n# or\nyarn install httpsms\n```\n\n## Implemented\n\n- [x] **[Messages](#messages)**\n  - [x] `POST /v1/messages/send`: Send a new SMS\n- [x] **Cipher**\n  - [x] `Encrypt`: Encrypt the content of a message to cipher text\n  - [x] `Decrypt`: Decrypt an encrypted message content to plain text\n\n## Usage\n\n### Initializing the Client\n\nAn instance of the client can be created using `httpsms.New()`.\n\n```js\nimport HttpSms from \"httpsms\"\n\nconst client = new HttpSms(\"\"/* Get API Key from https://httpsms.com/settings */);\n```\n\n### Error handling\n\nAll API calls return a `Promise\u003cT\u003e` as the return object. You can handle the response in the `then` and `catch` methods.\n\n### Messages\n\n#### `POST /v1/messages/send`: Send an SMS Message\n\n```js\nawait client.messages.postSend({\n\tcontent: 'This is a sample text message',\n\tfrom: '+18005550199',\n\tto: '+18005550100',\n})\n.then((message) =\u003e {\n\tconsole.log(message.id);\n})\n.catch((err) =\u003e {\n\tconsole.error(err);\n});\n```\n\n### Encrypt an SMS message before sending\n\n```js\nconst encryptionKey = \"Password123\";\nconst encryptedContent = await client.cipher.encrypt(\"This is a sample text message\", encryptionKey);\n\nawait client.messages.postSend({\n\tcontent: encryptedContent,\n\tfrom: '+18005550199',\n\tencrypted: true,\n\tto: '+18005550100',\n})\n.then((message) =\u003e {\n\tconsole.log(message.id);\n})\n.catch((err) =\u003e {\n\tconsole.error(err);\n});\n```\n\n## Testing\n\nYou can run the unit tests for this client from the root directory using the command below:\n\n```bash\npnpm run test\n```\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](license) file for details\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fndolestudio%2Fhttpsms-node","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fndolestudio%2Fhttpsms-node","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fndolestudio%2Fhttpsms-node/lists"}