CAMARA Number Verification API - CodeB Identity Solutions CAMARA Number Verification API - CodeB Identity Solutions

View Categories

CAMARA Number Verification API

1 min read

Overview #

The CAMARA NumberVerification API provides the customer with the ability to verify the phone number associated with the SIM used in the device connected to the mobile data network.

The complete definition of the CAMARA API can be found on: https://github.com/camaraproject/NumberVerification

Quick Start #

API Service Endpoint #

The API has two defined endpoints:

  • POST /number-verification/v0/device-phone-number: retrieves the phone number associated to the user’s MobileToken and returns it so the verification can be made.
    Demo Server: https://auth.aloaha.com/number-verification/v0/device-phone-number
  • POST /number-verification/v0/verify: checks if the user mobile phone number matches the phone number associated with the mobile device. The JSON input parameter is phoneNumber and contains the plain text phone number as input and it compares the received input with the authenticated user’s phone number associated to the MobileToken in order to respond true/false.
    Demo Server: https://auth.aloaha.com/number-verification/v0/verify

Code Snippets #

The snippets illustrate REST-based API calls using “curl” to request. The credentials for API authentication should be configured based on the target security system.

# Device Phone Number Code
curl -X 'POST' <base-url>/number-verification/v0/device-phone-number
-H 'accept: application/json'
-H 'Content-Type: application/json'
-H "Authorization: Bearer <token>"
-d '{ "phoneNumber": "+35679567034"}'

Result: {"devicePhoneNumber":"35679567034"}
Web Services Wrapper: https://auth.codeb.io/ws/camara.asmx?op=device_phone_number

# Verify Code
curl -X 'POST' <base-url>/number-verification/v0/verify
-H 'accept: application/json'
-H 'Content-Type: application/json'
-H "Authorization: Bearer <token>"
-d '{ "phoneNumber": "+35679567034"}'

Result: {"devicePhoneNumberVerified":true}
Web Services Wrapper: https://auth.codeb.io/ws/camara.asmx?op=verify_phone_number

Powered by BetterDocs