Twilio - Number Lookup -
i trying lookup carrier of phone number using twilio php sdk. however, getting certification error. not sure doing wrong. if can give me advice, appreciate! thank you.
$lookup_client = new lookups_services_twilio( $this->twilio_sid, $this->twilio_token ); $number = $lookup_client->phone_numbers->get( '1-416-333-1111', array( 'type' => 'carrier', "countrycode" => "us", ) ); echo $number->carrier;
services_twilio_tinyhttpexception: ssl certificate problem, verify ca cert ok. details: error:14090086:ssl routines:ssl3_get_server_certificate:certificate verify failed in twilio-php\services\twilio\tinyhttp.php on line 119
i made while ago. made can raw input phone number. hope helps!
import sys import os twilio.rest.lookups import twiliolookupsclient try: client = twiliolookupsclient() phone = raw_input (" enter targets phone number: ") number = client.phone_numbers.get((phone), include_carrier_info=true, ) print(number.carrier['name']) print(number.carrier['type']) except: print ("error while handling phone number")
Comments
Post a Comment