All URIs are relative to https://api.cloudmersive.com
Method | HTTP request | Description |
---|---|---|
phoneNumberSyntaxOnly | POST /validate/phonenumber/basic | Validate phone number (basic) |
\Swagger\Client\Model\PhoneNumberValidationResponse phoneNumberSyntaxOnly($value)
Validate phone number (basic)
Validate a phone number by analyzing the syntax
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: Apikey
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Apikey', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Apikey', 'Bearer');
$apiInstance = new Swagger\Client\Api\PhoneNumberApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$value = new \Swagger\Client\Model\PhoneNumberValidateRequest(); // \Swagger\Client\Model\PhoneNumberValidateRequest | Phone number to validate in a PhoneNumberValidateRequest object. Try a phone number such as \"1.800.463.3339\", and either leave DefaultCountryCode blank or use \"US\".
try {
$result = $apiInstance->phoneNumberSyntaxOnly($value);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling PhoneNumberApi->phoneNumberSyntaxOnly: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
value | \Swagger\Client\Model\PhoneNumberValidateRequest | Phone number to validate in a PhoneNumberValidateRequest object. Try a phone number such as "1.800.463.3339", and either leave DefaultCountryCode blank or use "US". |
\Swagger\Client\Model\PhoneNumberValidationResponse
- Content-Type: application/json, text/json
- Accept: application/json, text/json, application/xml, text/xml
[Back to top] [Back to API list] [Back to Model list] [Back to README]