BoxLang 🚀 A New JVM Dynamic Language Learn More...

Numverify API Module

v1.0.0+0002 Modules

Numverify API Coldbox Module

Coldbox module for using the Numverify phone number validation API.

Installation

This library can be installed as a ColdBox Module. Install with a simple CommandBox command:

$ box install numverify

Alternatively the git repository can be cloned into the desired directory.

ColdBox Module

To use, add the init arguments to the moduleSettings struct in config/Coldbox.cfc:

moduleSettings = {
    numverify: {
        accessKey: ''
    }
}

You can then leverage the library via the injection DSL: Numverify@numverify:

property name="Numverify" inject="Numverify@numverify";

Getting Started

// To validate a phone number with country code
validationResult = Numverify.validate("12075551212");
// OR without, but providing country ID
validationResult = Numverify.validate("2075551212","US");

// list country codes with dialling prefix
countries = Numverify.countries();

numverify is modeled after the official NumVerify API. All responses are JSON and converted to structs by the module. Documentation is here: https://numverify.com/documentation

A free account is required to get an access key.

  •   Sean Daniels
  • Published
  • 1.0.0+0002 is the latest of 1 release(s)
    Published
  • Published on {{ getFullDate("2021-01-14T15:19:04Z") }}

$ box install numverify-new

No collaborators yet.
  • {{ getFullDate("2021-01-14T15:19:04Z") }}
  • {{ getFullDate("2021-01-14T15:19:04Z") }}
  • 1,330
  • 8