Files
kulakpos_web/vendor/twilio/sdk/example/signingKey.php
triagungbiantoro 417b7b7453
All checks were successful
Build, Push and Deploy / build-and-push (push) Successful in 3m27s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 16s
Build, Push and Deploy / deploy-staging (push) Successful in 31s
Build, Push and Deploy / deploy-production (push) Has been skipped
harga pada beranda terhubung ke manage plans di dashboard admin
2026-04-25 21:57:25 +07:00

28 lines
949 B
PHP
Executable File

<?php
require(__DIR__.'/../src/Twilio/autoload.php');
require(__DIR__.'/../vendor/autoload.php');
use Twilio\Rest\Client;
$sid = getenv('TWILIO_ACCOUNT_SID');
$token = getenv('TWILIO_AUTH_TOKEN');
$client = new Client($sid, $token);
// Create new Signing Key
$signingKey = $client->api->v2010->newSigningKeys->create();
// Switch to guzzle client as the default client
$guzzleClient = new Client($signingKey->sid, $signingKey->secret, $sid, null, new \Twilio\Http\GuzzleClient(new \GuzzleHttp\Client));
// The phone number you are querying in E.164 or national format.
// If the phone number is provided in national format, please also specify the country in the optional parameter CountryCode.
// Otherwise, CountryCode will default to US.
$number = "+XXXXXXXXXX";
// Make REST API requests
$phone_number = $guzzleClient->lookups->v1->phoneNumbers($number)
->fetch([
"type" => ["carrier"]
]);
print_r($phone_number->carrier);