AbstractAPI Phone Number Verification
| Feature Name | AbstractAPI Phone Number Verification |
| Feature ID | CrestApps.OrchardCore.PhoneNumbers.Verifications.AbstractApi |
| Depends on | CrestApps.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.
| Setting | Default | Purpose |
|---|---|---|
| API key | (empty) | The API key issued by AbstractAPI. Stored as a protected value. |
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 field | Source |
|---|---|
IsValid / IsReachable | valid |
NormalizedPhoneNumber | format.international |
NationalFormat | format.local |
LineType, IsMobile, IsLandline, IsVoip | type |
CountryCode / CountryName | country.code / country.name |
CountryPrefix | country.prefix |
Carrier | carrier |
LineStatus | phone_validation.line_status when returned. |
MinimumAge | phone_validation.minimum_age when returned. |
TimeZone | Derived from the normalized number via IPhoneNumberService. |
RawProviderResponse | The 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
- Create an account at abstractapi.com and copy the Phone Validation API key.
- Enable the AbstractAPI Phone Number Verification feature under Configuration -> Features.
- Open Settings -> Phone Number Verifications, select the AbstractAPI tab, paste the key, and save.
- On the General tab, select AbstractAPI as the default provider.
Troubleshooting
| Symptom | Resolution |
|---|---|
Verifications always return Failed | Confirm 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 missing | Ensure the AbstractAPI Phone Number Verification feature is enabled. |
| Numbers are not normalized to E.164 | Provide numbers with a country context, or enable the Phone Numbers Services feature so IPhoneNumberService can normalize them. |
| Rotated key has no effect | Saving an empty API key keeps the previous key. Enter the new key explicitly to replace it. |