{"id":15674591,"url":"https://github.com/transitive-bullshit/getsmscode","last_synced_at":"2025-09-13T14:52:40.168Z","repository":{"id":56377361,"uuid":"141062170","full_name":"transitive-bullshit/getsmscode","owner":"transitive-bullshit","description":"API client for getsmscode.com","archived":false,"fork":false,"pushed_at":"2020-11-11T11:26:38.000Z","size":88,"stargazers_count":14,"open_issues_count":2,"forks_count":11,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-06T22:07:28.455Z","etag":null,"topics":["api","api-client","getsmscode","otp","sms"],"latest_commit_sha":null,"homepage":null,"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/transitive-bullshit.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}},"created_at":"2018-07-15T22:16:40.000Z","updated_at":"2024-06-17T03:22:42.000Z","dependencies_parsed_at":"2022-08-15T17:40:18.246Z","dependency_job_id":null,"html_url":"https://github.com/transitive-bullshit/getsmscode","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/transitive-bullshit%2Fgetsmscode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/transitive-bullshit%2Fgetsmscode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/transitive-bullshit%2Fgetsmscode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/transitive-bullshit%2Fgetsmscode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/transitive-bullshit","download_url":"https://codeload.github.com/transitive-bullshit/getsmscode/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252776581,"owners_count":21802468,"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":["api","api-client","getsmscode","otp","sms"],"created_at":"2024-10-03T15:47:34.104Z","updated_at":"2025-05-06T22:07:34.625Z","avatar_url":"https://github.com/transitive-bullshit.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# getsmscode\n\n\u003e API client for [getsmscode.com](http://www.getsmscode.com/).\n\n[![NPM](https://img.shields.io/npm/v/getsmscode.svg)](https://www.npmjs.com/package/getsmscode) [![Build Status](https://travis-ci.com/transitive-bullshit/getsmscode.svg?branch=master)](https://travis-ci.com/transitive-bullshit/getsmscode) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n\n-   provides temporary, physical mobile numbers (not virtual VOIP numbers!)\n-   meant for automated systems that need to bypass SMS number verification\n-   handles hundreds of known services (wechat, google, facebook, whatsapp, uber, twitter, etc...)\n\n## Install\n\nThis module requires `node \u003e= 8`.\n\n```bash\nnpm install --save getsmscode\n```\n\nYou'll need to setup a [getsmscode.com](http://www.getsmscode.com/) account and add some money to your account before using this module.\n\n## Usage\n\n```js\nconst GetSMSCodeClient = require('getsmscode')\n\nconst client = new GetSMSCodeClient({\n  username: '...',\n  token: '...'\n})\n\nconst number = await client.getNumber({\n  service: 'google'\n})\n\n// give this number to third-party service such as google...\n// third-party service sends SMS code to the given number...\n\nconst sms = await client.getSMS({\n  service: 'google',\n  number: number\n})\n```\n\n**Note**: there may be variable amounts of latency between giving your number to the service and the SMS code being received. If no valid messages are returned, it is recommended that you retry `client.getSMS` with an exponential timeout. Be careful not to call the API too fast, however, as `getsmscode` imposes strict rate limits.\n\n## API\n\n\u003c!-- Generated by documentation.js. Update this documentation by updating the source code. --\u003e\n\n### [GetSMSCodeClient](https://github.com/transitive-bullshit/getsmscode/blob/e3a59494c4d4699af1d77e1cea0424da1b6f0e82/index.js#L43-L214)\n\nType: `function (opts)`\n\n-   `opts` **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Config options\n    -   `opts.username` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Username for getsmscode auth (optional, default `process.env.GETSMSCODE_USERNAME`)\n    -   `opts.token` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Token for getsmscode auth (optional, default `process.env.GETSMSCODE_TOKEN`)\n    -   `opts.domain` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Domain for this client to use (china/usa/asia) (optional, default `'china'`)\n\n* * *\n\n#### [login](https://github.com/transitive-bullshit/getsmscode/blob/e3a59494c4d4699af1d77e1cea0424da1b6f0e82/index.js#L71-L80)\n\nLogs in to test auth and fetches an account summary.\n\nType: `function (): Promise`\n\n* * *\n\n#### [getNumber](https://github.com/transitive-bullshit/getsmscode/blob/e3a59494c4d4699af1d77e1cea0424da1b6f0e82/index.js#L94-L114)\n\nAcquires a temporary handle on a mobile number usable for the given service.\n\nYou must specify either `opts.service` or `opts.pid`.\n\nType: `function (opts): Promise`\n\n-   `opts` **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** Config options\n    -   `opts.service` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** Name of service to blacklist number\n    -   `opts.pid` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** Project ID of service to blacklist number\n    -   `opts.cocode` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** Country code (required if using asian domain)\n\n* * *\n\n#### [getNumbers](https://github.com/transitive-bullshit/getsmscode/blob/e3a59494c4d4699af1d77e1cea0424da1b6f0e82/index.js#L121-L131)\n\nReturns a list of `{ number, service }` objects currently in use by this account.\n\nType: `function (): Promise`\n\n* * *\n\n#### [getSMS](https://github.com/transitive-bullshit/getsmscode/blob/e3a59494c4d4699af1d77e1cea0424da1b6f0e82/index.js#L145-L166)\n\nYou must specify either `opts.service` or `opts.pid`.\n\nType: `function (opts): Promise`\n\n-   `opts` **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** Config options\n    -   `opts.number` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Mobile number to blacklist\n    -   `opts.service` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** Name of service to blacklist number\n    -   `opts.pid` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** Project ID of service to blacklist number\n    -   `opts.cocode` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** Country code (required if using asian domain)\n\n* * *\n\n#### [addNumberToBlacklist](https://github.com/transitive-bullshit/getsmscode/blob/e3a59494c4d4699af1d77e1cea0424da1b6f0e82/index.js#L181-L196)\n\nAdds a number to this account's blacklist for the given service.\n\nYou must specify either `opts.service` or `opts.pid`.\n\nType: `function (opts): Promise`\n\n-   `opts` **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** Config options\n    -   `opts.number` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Mobile number to blacklist\n    -   `opts.service` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** Name of service to blacklist number\n    -   `opts.pid` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** Project ID of service to blacklist number\n    -   `opts.cocode` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** Country code (required if using asian domain)\n\n## Related\n\n-   [sms-number-verifier](https://github.com/transitive-bullshit/sms-number-verifier) - Allows you to spoof SMS number verification.\n-   [parse-otp-message](https://github.com/transitive-bullshit/parse-otp-message) - Parses OTP messages for a verification code and service provider.\n\n## Disclaimer\n\nUsing this software to violate the terms and conditions of any third-party service is strictly against the intent of this software. By using this software, you are acknowledging this fact and absolving the author or any potential liability or wrongdoing it may cause. This software is meant for testing and experimental purposes only, so please act responsibly.\n\n## License\n\nMIT © [Travis Fischer](https://github.com/transitive-bullshit)\n\nSupport my OSS work by \u003ca href=\"https://twitter.com/transitive_bs\"\u003efollowing me on twitter \u003cimg src=\"https://storage.googleapis.com/saasify-assets/twitter-logo.svg\" alt=\"twitter\" height=\"24px\" align=\"center\"\u003e\u003c/a\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftransitive-bullshit%2Fgetsmscode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftransitive-bullshit%2Fgetsmscode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftransitive-bullshit%2Fgetsmscode/lists"}