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

Numverify API Module

v1.0.4 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.4 is the latest of 7 release(s)
    Published
  • Published on {{ getFullDate("2022-03-16T20:19:11Z") }}

$ box install numverify

No collaborators yet.
  • {{ getFullDate("2020-12-11T15:35:42Z") }}
  • {{ getFullDate("2022-03-16T20:19:11Z") }}
  • 3,139
  • 3,833