Skip to main content
Version: Latest

AbstractAPI Phone Number Verification

Feature NameAbstractAPI Phone Number Verification
Feature IDCrestApps.OrchardCore.PhoneNumbers.Verifications.AbstractApi
Depends onCrestApps.OrchardCore.PhoneNumbers.Verifications

Purpose

The AbstractAPI Phone Number Verification feature verifies phone numbers using the AbstractAPI Phone Validation service. It is a provider for the Phone Number Verifications framework: it calls the AbstractAPI endpoint and maps the response into the framework's provider-agnostic result model.

Enabling this feature automatically enables the core Phone Number Verifications feature and registers the AbstractAPI provider under the key AbstractApi, making it selectable as the default provider.

Configuration

Configure the provider under Settings -> Phone Number Verifications on the AbstractAPI tab. The tab only appears when this feature is enabled.

SettingDefaultPurpose
API key(empty)The API key issued by AbstractAPI. Stored as a protected value.

AbstractAPI provider settings tab

Screenshot placeholder: the AbstractAPI settings tab.

Authentication

AbstractAPI authenticates requests with an API key supplied as the api_key query string parameter. Provide the key issued from your AbstractAPI dashboard. The key is trimmed before it is protected and again after it is unprotected for outbound requests, so accidental leading or trailing whitespace from copy/paste is not sent to AbstractAPI. The key is stored using ASP.NET Core Data Protection and is never displayed again after it is saved — enter a new value to rotate it, or leave the field empty to keep the existing key.

Site settings

The provider settings are stored in the AbstractApiPhoneNumberVerificationSettings site settings object and can also be provisioned through the Recipes module's generic settings step:

{
"steps": [
{
"name": "settings",
"AbstractApiPhoneNumberVerificationSettings": {
"ProtectedApiKey": "encrypted-api-key"
}
}
]
}

Secret values (ProtectedApiKey) are stored encrypted. Provision them through the admin UI so they are encrypted with the tenant's data-protection keys.

Verification capabilities

AbstractAPI returns the following information, which the provider maps into the common result model:

Result fieldSource
IsValid / IsReachablevalid
NormalizedPhoneNumberformat.international
NationalFormatformat.local
LineType, IsMobile, IsLandline, IsVoiptype
CountryCode / CountryNamecountry.code / country.name
CountryPrefixcountry.prefix
Carriercarrier
LineStatusphone_validation.line_status when returned.
MinimumAgephone_validation.minimum_age when returned.
TimeZoneDerived from the normalized number via IPhoneNumberService.
RawProviderResponseThe full JSON payload.
Metadata["location"]location

When AbstractAPI returns phone_validation.line_status, the provider only verifies numbers whose line status is active. If the response does not include a line status, the provider falls back to the valid flag alone.

Sample configuration

  1. Create an account at abstractapi.com and copy the Phone Validation API key.
  2. Enable the AbstractAPI Phone Number Verification feature under Configuration -> Features.
  3. Open Settings -> Phone Number Verifications, select the AbstractAPI tab, paste the key, and save.
  4. On the General tab, select AbstractAPI as the default provider.

Troubleshooting

SymptomResolution
Verifications always return FailedConfirm the API key is valid and that the endpoint is reachable. Re-enter and save the API key if it may have been copied with hidden whitespace. Check the application logs for the AbstractAPI status code, safe endpoint, and whether an API key was configured.
The AbstractAPI tab is missingEnsure the AbstractAPI Phone Number Verification feature is enabled.
Numbers are not normalized to E.164Provide numbers with a country context, or enable the Phone Numbers Services feature so IPhoneNumberService can normalize them.
Rotated key has no effectSaving an empty API key keeps the previous key. Enter the new key explicitly to replace it.