{"id":43249000,"url":"https://github.com/bsgworld/bsg-nodejs","last_synced_at":"2026-02-01T12:54:06.845Z","repository":{"id":70249723,"uuid":"81922374","full_name":"bsgworld/bsg-nodejs","owner":"bsgworld","description":"The open source Node.js client for BSG's REST API. SMS, Viber, HLR services","archived":false,"fork":false,"pushed_at":"2024-06-07T08:55:30.000Z","size":14,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-06-07T10:18:46.384Z","etag":null,"topics":["bsg","nodejs-sms","sms","sms-api","sms-gateway","sms-messages","sms-nodejs","sms-provider","sms-service","viber-api"],"latest_commit_sha":null,"homepage":"https://bsg.world/developers/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bsgworld.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":"2017-02-14T08:22:31.000Z","updated_at":"2024-06-07T09:04:02.000Z","dependencies_parsed_at":"2024-06-07T10:22:33.611Z","dependency_job_id":null,"html_url":"https://github.com/bsgworld/bsg-nodejs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bsgworld/bsg-nodejs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bsgworld%2Fbsg-nodejs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bsgworld%2Fbsg-nodejs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bsgworld%2Fbsg-nodejs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bsgworld%2Fbsg-nodejs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bsgworld","download_url":"https://codeload.github.com/bsgworld/bsg-nodejs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bsgworld%2Fbsg-nodejs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28978417,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-01T12:13:08.691Z","status":"ssl_error","status_checked_at":"2026-02-01T12:13:08.356Z","response_time":56,"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":["bsg","nodejs-sms","sms","sms-api","sms-gateway","sms-messages","sms-nodejs","sms-provider","sms-service","viber-api"],"created_at":"2026-02-01T12:54:05.235Z","updated_at":"2026-02-01T12:54:06.838Z","avatar_url":"https://github.com/bsgworld.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BSG API. Free SMS API - Node.js\n\nThis repository contains the open source Node.js client for BSG API.\n\n## Requirements\n\n- [Sign up](https://app.bsg.world/auth/signup?utm_source=github\u0026utm_medium=referral\u0026utm_campaign=nodejs) for a free account\n- Get api key [here](https://app.bsg.world/integration/remote?utm_source=github\u0026utm_medium=referral\u0026utm_campaign=nodejs)\n- Go through the [API documentation](https://bsg.world/documentations/rest-api/sms-api/sending-sms/?utm_source=github\u0026utm_medium=referral\u0026utm_campaign=nodejs)\n\n\n## Installation\n\n`npm install bsg-nodejs`\n\n\nUsage\n-----\n\n\n```javascript\nvar bsg = require( 'bsg' )( '\u003cYOUR_ACCESS_KEY\u003e' );\n\nbsg.createHLR(\n\t{\n\t\tmsisdn: '380972920000',\n\t\treference: 'extid1',\n\t\ttariff: '0',\n\t\tcallback_url: 'http://someurl.com/callback/?id=12345'\n\t}\n).then(\n\tHLR =\u003e console.log( \"HLR created:\", HLR ),\n\terror =\u003e console.log( \"HLR creation failed:\", error )\n);\n```\n\n```javascript\nvar bsg = require( 'bsg' )( '\u003cYOUR_ACCESS_KEY\u003e' );\n\nbsg.createSMS(\n\t{\n\t\tdestination: \"phone\",\n\t\toriginator:\"alpha name\",\n\t\tbody:\"message text\",\n\t\tmsisdn:\"380972000000\",\n\t\treference:\"ext_id_16\",\n\t\tvalidity:\"1\",\n\t\ttariff:\"0\"\n\t}\n).then(\n\tSMS =\u003e console.log( \"SMS created:\", SMS ),\n\terror =\u003e console.log( \"SMS creation failed:\", error )\n);\n```\n\n```javascript\nvar bsg = require( 'bsg' )( '\u003cYOUR_ACCESS_KEY\u003e' );\n\nbsg.createViber(\n\t{\n\t\ttariff:0,\n\t\tvalidity:1,\n\t\tmessages:[\n\t\t\t{\n\t\t\t\tto:[\n\t\t\t\t\t{\n\t\t\t\t\t\tmsisdn:380972920000,\n\t\t\t\t\t\treference:\"ext_id_19\"\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\ttext:\"My Viber messages is shinier than your SMS messages\",\n\t\t\t\talpha_name:\"BSG\",\n\t\t\t\tis_promotional:false,\n\t\t\t\toptions:{\n\t\t\t\t\tviber:{\n\t\t\t\t\t\timg:\"http://mysite.com/logo.png\",\n\t\t\t\t\t\tcaption:\"See Details\",\n\t\t\t\t\t\taction:\"http://mysite.com/\"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t]\n\t}\n).then(\n\tviber =\u003e console.log( \"Viber created:\", viber ),\n\terror =\u003e console.log( \"Viber creation failed:\", error )\n);\n```\n\n```javascript\nvar bsg = require( 'bsg' )( '\u003cYOUR_ACCESS_KEY\u003e' );\n\nbsg.getBalance().then(\n\tbalance =\u003e console.log( \"Balance request completed:\", balance ),\n\terror =\u003e console.log( \"Balance request failed\", error )\n);\n```\n\n```javascript\nvar bsg = require( 'bsg' )( '\u003cYOUR_ACCESS_KEY\u003e' );\n\nbsg.getHLR(\n\t{\n\t\treference: 'extid1'\n\t}\n).then(\n\tHLR =\u003e console.log( \"HLR retrieved:\", HLR ),\n\terror =\u003e console.log( \"HLR retrieval failed:\", error )\n);\n```\n\n```javascript\nvar bsg = require( 'bsg' )( '\u003cYOUR_ACCESS_KEY\u003e' );\n\nbsg.getHLRPrices().then(\n\tprices =\u003e console.log( \"HLR prices retrieved:\", prices ),\n\terror =\u003e console.log( \"HLR prices retrieval failed:\", error )\n);\n```\n\n```javascript\nvar bsg = require( 'bsg' )( '\u003cYOUR_ACCESS_KEY\u003e' );\n\nbsg.getSMS(\n\t{\n\t\treference: 'ext_id_16'\n\t}\n).then(\n\tSMS =\u003e console.log( \"SMS retrieved:\", SMS ),\n\terror =\u003e console.log( \"SMS retrieval failed:\", error )\n);\n```\n\n```javascript\nvar bsg = require( 'bsg' )( '\u003cYOUR_ACCESS_KEY\u003e' );\n\nbsg.getSMSPrices().then(\n\tprices =\u003e console.log( \"SMS prices retrieved:\", prices ),\n\terror =\u003e console.log( \"SMS prices retrieval failed:\", error )\n);\n```\n\n```javascript\nvar bsg = require( 'bsg' )( '\u003cYOUR_ACCESS_KEY\u003e' );\n\nbsg.getViber(\n\t{\n\t\treference: 'ext_id_19'\n\t}\n).then(\n\tviber =\u003e console.log( \"Viber retrieved:\", viber ),\n\terror =\u003e console.log( \"Viber retrieval failed:\", error )\n);\n```\n\n```javascript\nvar bsg = require( 'bsg' )( '\u003cYOUR_ACCESS_KEY\u003e' );\n\nbsg.getViberPrices().then(\n\tprices =\u003e console.log( \"Viber prices retrieved:\", prices ),\n\terror =\u003e console.log( \"Viber prices retrieval failed:\", error )\n);\n```\n\nTake a look into 'examples' folder for complete list of available calls\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbsgworld%2Fbsg-nodejs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbsgworld%2Fbsg-nodejs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbsgworld%2Fbsg-nodejs/lists"}