-
Notifications
You must be signed in to change notification settings - Fork 0
Check Number
Md. Mazharul islam Mithu edited this page May 4, 2017
·
1 revision
The Check Number API allows you to receive information about a provided phone number into E.164 format and the supported validation methods for that number.
First make sure you added API key properly during setup. then
client = CheckMobi::Resources::CheckNumber.new(phone_number: 'phone_number_with_country_code')
response = client.perform
checked_number_info = JSON.parse(response.response_body)If everything works fine you will get like this
{"country_code"=>xxx,
"country_iso_code"=>"COUNTRY_CODE",
"carrier"=>"Carrier",
"is_mobile"=>true,
"e164_format"=>"+xxxxxxxxxx",
"formatting"=>"+xxx xxxx-xxxxxx",
"validation_methods"=>
{"cli"=>{"available"=>true, "local_number"=>false},
"sms"=>{"available"=>true, "min_rate"=>0.0098, "max_rate"=>0.0962},
"ivr"=>
{"available"=>true,
"min_rate"=>0.0641,
"max_rate"=>0.078,
"estimation_cost"=>0.0641},
"reverse_cli"=>
{"available"=>true,
"min_rate"=>0.0641,
"max_rate"=>0.078,
"estimation_cost"=>0.0641}
}
}