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}`)
})()
api.activation
.newActivation({ service_id: 527, country_id: 'us' })
.then(async (activation: NumSdk.newActivationResponseType) => {
const activationStatus = await api.activation.getActivationState(activation.id)
})