Skip to content

Latest commit

 

History

History
98 lines (68 loc) · 3.58 KB

api.md

File metadata and controls

98 lines (68 loc) · 3.58 KB

SMSPVAClient

Kind: global class

new SMSPVAClient([opts])

Param Type Default Description
[opts] object Config options
[opts.key] string "process.env.SMSPVA_KEY" API key for smspva

smspvaClient.getNumber(country, service)

Acquires a virtual number based on provided specifications to be used for SMS verification.

Kind: instance method of SMSPVAClient

Param Type Description
country string Country code identifier from which the number will originate
service string Specified service the number will be used with

smspvaClient.getBalance(service) ⇒ number

Returns User's balance

Kind: instance method of SMSPVAClient Returns: number - User's balance

Param Type Description
service string Particular service to check balance for

smspvaClient.getSMS(id, country, service, [retries])

Polls smspva API for response containing SMS verification code, returns this code.

Kind: instance method of SMSPVAClient

Param Type Default Description
id string Unique identifier for the number issued by smspva
country string "US" Country identifier
service string "google" Service the number issued from smspva is being used for
[retries] number 20 Retry count (Optional)

smspvaClient.ban(id, country, service)

Bans a particular number, given its unique identifier

Kind: instance method of SMSPVAClient

Param Type Description
id string Unique identifier for the number
country string Origin country for the number
service string Service number is being used for

smspvaClient.getCountNew(service, country)

Retrieves the amount of free activations for a certain service

Kind: instance method of SMSPVAClient

Param Type Description
service string Service specified
country string Country

smspvaClient.get2FA(secret) ⇒ string

Retrieves the 2FA code associated with the given OAUTH secret token [Useful for bypassing 2FA]

Kind: instance method of SMSPVAClient Returns: string - 2FA authorizatio code

Param Type Description
secret string Secret for 2FA account