{"id":37384910,"url":"https://github.com/smsglobal/smsglobal-node","last_synced_at":"2026-01-16T05:18:15.069Z","repository":{"id":54306803,"uuid":"292732055","full_name":"smsglobal/smsglobal-node","owner":"smsglobal","description":"The SMSGlobal Node library provides convenient access to the SMSGlobal rest API from node applications.","archived":false,"fork":false,"pushed_at":"2025-11-11T03:35:28.000Z","size":54,"stargazers_count":8,"open_issues_count":5,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-11-11T05:28:47.410Z","etag":null,"topics":["node","node-library","node-module","nodejs","nodejs-library","sms","smsglobal"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/smsglobal.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-09-04T02:45:57.000Z","updated_at":"2025-05-23T14:59:20.000Z","dependencies_parsed_at":"2022-08-13T11:31:15.555Z","dependency_job_id":null,"html_url":"https://github.com/smsglobal/smsglobal-node","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/smsglobal/smsglobal-node","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smsglobal%2Fsmsglobal-node","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smsglobal%2Fsmsglobal-node/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smsglobal%2Fsmsglobal-node/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smsglobal%2Fsmsglobal-node/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/smsglobal","download_url":"https://codeload.github.com/smsglobal/smsglobal-node/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smsglobal%2Fsmsglobal-node/sbom","scorecard":{"id":833931,"data":{"date":"2025-08-11","repo":{"name":"github.com/smsglobal/smsglobal-node","commit":"e6c451ee446e30cfe596082f6969753ee9bd3830"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.4,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/12 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/nodejs.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/smsglobal/smsglobal-node/nodejs.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/nodejs.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/smsglobal/smsglobal-node/nodejs.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/nodejs.yml:28: update your workflow using https://app.stepsecurity.io/secureworkflow/smsglobal/smsglobal-node/nodejs.yml/master?enable=pin","Warn: npmCommand not pinned by hash: .github/workflows/nodejs.yml:24","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned","Info:   0 out of   1 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/nodejs.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 21 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-23T18:27:43.028Z","repository_id":54306803,"created_at":"2025-08-23T18:27:43.029Z","updated_at":"2025-08-23T18:27:43.029Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28477233,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T03:13:13.607Z","status":"ssl_error","status_checked_at":"2026-01-16T03:11:47.863Z","response_time":107,"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":["node","node-library","node-module","nodejs","nodejs-library","sms","smsglobal"],"created_at":"2026-01-16T05:18:14.399Z","updated_at":"2026-01-16T05:18:15.061Z","avatar_url":"https://github.com/smsglobal.png","language":"JavaScript","readme":"# SMSGlobal node SDK\n\n\n![Build](https://github.com/smsglobal/smsglobal-node/workflows/Build/badge.svg?branch=master)\n[![codecov](https://codecov.io/gh/smsglobal/smsglobal-node/branch/master/graph/badge.svg)](https://codecov.io/gh/smsglobal/smsglobal-node)\n[![Node](https://img.shields.io/node/v/smsglobal)](https://www.npmjs.com/package/smsglobal)\n[![npm](https://img.shields.io/npm/v/smsglobal)](https://www.npmjs.com/package/smsglobal)\n[![Downloads](https://img.shields.io/npm/dm/smsglobal.svg)](https://www.npmjs.com/package/smsglobal)\n\n\nThe SMSGlobal Node library provides convenient access to the SMSGlobal REST API from node applications.\n\nSign up for a [free SMSGlobal account](https://www.smsglobal.com/mxt-sign-up/?utm_source=dev\u0026utm_medium=github\u0026utm_campaign=node_sdk) today and get your API Key from our advanced SMS platform, MXT. Plus, enjoy unlimited free developer sandbox testing to try out your API in full!\n\n\n## Example\n Check out the [code examples](examples)\n\n\n## SMSGlobal rest API credentials\n\nRest API credentials can be provided in the SMSGlobal client or node environment variables. The credential variables are `SMSGLOBAL_API_KEY` and `SMSGLOBAL_API_SECRET`\n\n\n## Installation\n\n```\nnpm install --save smsglobal\n```\n\n\n## Usage\n\n* Require `smsglobal` in your file\n\n```\nconst apiKey = 'YOUR_API_KEY';\nconst apiSecret = 'YOUR_API_SECRET';\nvar smsglobal = require('smsglobal')(apiKey, secret);\n```\n\n\u003e All method return promise if no callback is given\n\n### To send a sms\n```js\nvar payload = {\n    origin: 'from number',\n    destination: 'destination',\n    message: 'This is a test message'\n}\n\nsmsglobal.sms.send(payload, function (error, response) {\n    console.log(response);\n});\n```\n### To fetch a list outgoing sms\n\n```js\nvar promise = smsglobal.sms.getAll();\n\npromise\n    .then(function(response) {\n        console.log(response)\n    })\n    .catch(function(error){\n        console.log(error)\n    });\n```\n\n### To fetch an outgoing sms by id\n\n```js\nvar id = 'outgoing-sms-id';\nvar promise = smsglobal.sms.get(id);\n\npromise\n    .then(function(response) {\n        console.log(response)\n    })\n    .catch(function(error){\n        console.log(error)\n    });\n```\n\n### To fetch a list incoming sms\n\n```js\nvar promise = smsglobal.sms.incoming.getAll();\n\npromise\n    .then(function(response) {\n        console.log(response)\n    })\n    .catch(function(error){\n        console.log(error)\n    });\n```\n\n### To fetch an incoming sms by id\n\n```js\nvar id = 'incoming-sms-id';\nvar promise = smsglobal.sms.incoming.get(id);\n\npromise\n    .then(function(response) {\n        console.log(response)\n    })\n    .catch(function(error){\n        console.log(error)\n    });\n```\n\n\n### To send an OTP\n```js\nvar payload = {\n  origin: 'from number',\n  message: '{*code*} is your SMSGlobal verification code.',\n  destination: 'destination'\n};\n\n// {*code*} placeholder is mandatory and will be replaced by an auto generated numeric code.\n\nsmsglobal.otp.send(payload, function(error, response) {\n  if (response) {\n    console.log(response);\n  }\n\n  if (error) {\n     console.log(error);\n  }\n});\n\n```\n\n*Success response object*\n\n```js\n{\n  statusCode: 200,\n  status: 'OK',\n  data: {\n    requestId: '404372541683676561917558',\n    destination: '61400000000',\n    validUnitlTimestamp: '2020-11-18 17:08:14',\n    createdTimestamp: '2020-11-18 16:58:14',\n    lastEventTimestamp: '2020-11-18 16:58:14',\n    status: 'Sent'\n  }\n}\n```\n\n*Error response object in the case of validation error*\n\n```js\n{\n  statusCode: 400,\n  status: 'Bad Request',\n  data: {\n    errors: {\n      message: {\n        errors: [\n          'Message template should contain a placeholder for code i.e. {*code*}.'\n        ]\n      }\n    }\n  }\n}\n\n```\n\n### To cancel an OTP request\nThe OTP request can be cancelled if it's not expired and verified yet. It can be done by either using `requestId` or `destination number`. The followings are examples of each method:\n\n```js\nvar id = 'otp-request-id'; // requestId received upon sending an OTP\nvar promise = smsglobal.otp.cancelByRequestId(id)\n\npromise.then((response) =\u003e {\n   console.log(response)\n}).catch((err) =\u003e {\n   console.log(error)\n});\n```\n```js\nvar destination = 'destination-number';\nvar promise = smsglobal.otp.cancelByDestination(id)\n\npromise.then((response) =\u003e {\n   console.log(response)\n}).catch((err) =\u003e {\n   console.log(error)\n});\n```\n\n*Success response object*\n\n```js\n{\n  statusCode: 200,\n  status: 'OK',\n  data: {\n    requestId: '404372541683676561917558',\n    destination: '61400000000',\n    validUnitlTimestamp: '2020-11-18 17:08:14',\n    createdTimestamp: '2020-11-18 16:58:14',\n    lastEventTimestamp: '2020-11-18 16:58:14',\n    status: 'Cancelled'\n  }\n}\n```\n\n### To verify an OTP code entered by your user\n\nThe OTP code entered by your user can be verified by either using `requestId` or `destination number`. The followings are examples of each method:\n\n```js\nvar id = 'otp-request-id'; // requestId received upon sending an OTP\nvar code = 'otp-code'; // input code entered by your user\n\nsmsglobal.otp.verifyByRequestId(id, code, function(error, response) {\n  if (response) {\n    console.log(response);\n  }\n\n  if (error) {\n     console.log(error);\n  }\n});\n```\n\n```js\nvar destination = 'destination-number';\nvar code = 'otp-code'; // input code entered by your user\n\nsmsglobal.otp.verifyByDestination(id, code, function(error, response) {\n  if (response) {\n    console.log(response);\n  }\n\n  if (error) {\n     console.log(error);\n  }\n});\n```\n\n*Success response object*\n\n```js\n{\n  statusCode: 200,\n  status: 'OK',\n  data: {\n    requestId: '404372541683676561917558',\n    destination: '61400000000',\n    validUnitlTimestamp: '2020-11-18 17:08:14',\n    createdTimestamp: '2020-11-18 16:58:14',\n    lastEventTimestamp: '2020-11-18 16:58:14',\n    status: 'Verified'\n  }\n}\n```\n\n\n## Running tests\n\nRun the tests:\n\n```\nnpm test\n```\n\nTo run test with code coverage report\n\n```\nnpm run mocha-only\n```\n\n## Available REST API Resources\n* Sms\n* Sms Incoming\n* OTP (beta)\n\n# Reference\n[REST API Documentation](https://www.smsglobal.com/rest-api/?utm_source=dev\u0026utm_medium=github\u0026utm_campaign=node_sdk)\n\nFor any query [contact us](https://www.smsglobal.com/contact/?utm_source=dev\u0026utm_medium=github\u0026utm_campaign=node_sdk)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmsglobal%2Fsmsglobal-node","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsmsglobal%2Fsmsglobal-node","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmsglobal%2Fsmsglobal-node/lists"}