Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tempnumber-client

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tempnumber-client

temp-number.org SMS Typescript client

  • 1.0.1
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
99
increased by191.18%
Maintainers
1
Weekly downloads
 
Created
Source

Num SDK

TypeScript SDK for temp-number.org/business mass phone activation service

Install

Install the package using npm

npm install tempnumber-client

Usage/Examples

import NumSdk, * as sdk from 'tempnumber-client'

const api = new NumSdk({ apiKey: 'YOUR_API_KEY', baseUrl: 'https://business.temp-number.org/v1' })(async () => {
  const balance = await this.api.user.getBalance()
  console.log(`My balance is ${balance.total}`)
})()

/* Getting a number to activate Twitter service in US */
api.activation
  .newActivation({ service_id: 527, country_id: 'us' })
  .then(async (activation: NumSdk.newActivationResponseType) => {
    // Send message to number activation.phone

    // Receive sms
    const activationStatus = await api.activation.getActivationState(activation.id)
    // Use received sms message and OTP code parsed from it
    // activationStatus.sms_code is a parsed activation code from sms message
    // activationStatus.sms_text is a full sms message
  })

Keywords

FAQs

Package last updated on 19 Jun 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc