{"id":49504,"library":"textmagic-rest-client","title":"TextMagic REST Client","description":"A Node.js client for the TextMagic REST API (v2), enabling SMS sending and receipt via TextMagic platform. Current stable is v1.0.11, released sporadically with minimal updates. Lightweight alternative to full SDKs; supports Node >=0.10. No native TypeScript types, no ESM exports. Primarily used in older Node projects.","status":"maintenance","version":"1.0.11","language":"javascript","source_language":"en","source_url":"https://github.com/textmagic/textmagic-rest-nodejs","tags":["javascript","textmagic","sms","texting","messages","mobile","rest"],"install":[{"cmd":"npm install textmagic-rest-client","lang":"bash","label":"npm"},{"cmd":"yarn add textmagic-rest-client","lang":"bash","label":"yarn"},{"cmd":"pnpm add textmagic-rest-client","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Package uses CommonJS only; ES import will fail. Instantiate with constructor using username and API key.","wrong":"import TextMagic from 'textmagic-rest-client';","symbol":"TextMagic","correct":"const TextMagic = require('textmagic-rest-client');\nconst client = new TextMagic('username', 'apikey');"},{"note":"The default export is the constructor; named destructuring yields undefined.","wrong":"const { TextMagic } = require('textmagic-rest-client');","symbol":"default import","correct":"const TextMagic = require('textmagic-rest-client');"},{"note":"API uses nested resource objects (e.g., Messages); individual methods not exposed directly. Callback-style, no promises.","wrong":"client.sendSms('Hello', '+1234567890');","symbol":"sendSms","correct":"client.Messages.send({ text: 'Hello', phones: '+1234567890' }, callback);"}],"quickstart":{"code":"const TextMagic = require('textmagic-rest-client');\nconst username = process.env.TEXTMAGIC_USERNAME ?? '';\nconst apikey = process.env.TEXTMAGIC_APIKEY ?? '';\nconst client = new TextMagic(username, apikey);\nclient.Messages.send({\n  text: 'Hello from Node.js',\n  phones: '+1234567890'\n}, function(err, res) {\n  if (err) {\n    console.error('Error sending SMS:', err);\n  } else {\n    console.log('Message sent:', res.id);\n  }\n});","lang":"javascript","description":"Demonstrates creating a TextMagic client and sending an SMS with callback."},"warnings":[{"fix":"Promisify manually or use async/await via util.promisify.","message":"Callback-based API only, no Promise support.","severity":"breaking","affected_versions":">=0.0.0"},{"fix":"Use a compatibility layer or switch to a maintained SDK.","message":"Requires Node >= 0.10, may fail on modern Node versions due to removed APIs.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Consider using the official TextMagic SDK or direct REST calls.","message":"Package not actively maintained; last release 2016.","severity":"deprecated","affected_versions":">=1.0.0"}],"env_vars":null,"search_vec":"'0.10':37 'altern':31 'api':11 'client':3,6 'current':21 'enabl':13 'esm':43 'export':44 'full':33 'javascript':51 'lightweight':30 'messag':55 'minim':28 'mobil':56 'nativ':39 'node':36,49 'node.js':5 'older':48 'platform':20 'primarili':45 'project':50 'receipt':17 'releas':25 'rest':2,10,57 'sdks':34 'send':15 'sms':14,53 'sporad':26 'stabl':22 'support':35 'text':54 'textmag':1,9,19,52 'type':41 'typescript':40 'updat':29 'use':46 'v1.0.11':24 'v2':12 'via':18","created_at":"2026-06-07T17:02:06.444135+00:00","updated_at":"2026-06-07T17:02:06.444135+00:00","problems":[{"fix":"Use const TextMagic = require('textmagic-rest-client');","cause":"Incorrect import style (ES import or destructured from CommonJS).","error":"TypeError: TextMagic is not a constructor"},{"fix":"Run npm install textmagic-rest-client --save","cause":"Package not installed or Node version incompatible.","error":"Error: Cannot find module 'textmagic-rest-client'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/textmagic/textmagic-rest-nodejs#readme","github":"https://github.com/textmagic/textmagic-rest-nodejs","docs":null,"changelog":null,"pypi":null,"npm":"textmagic-rest-client","openapi_spec":null,"status_page":null,"smithery":null,"categories":["messaging"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-07","next_check":"2026-09-05","install_tag":null}}