Table of Contents

Interface INumberInsightClient

Namespace
Vonage.NumberInsights
Assembly
Vonage.dll

Exposes Number Insight API features for retrieving information about phone numbers including carrier, validity, roaming status, and caller identity.

public interface INumberInsightClient

Methods

GetNumberInsightAdvancedAsync(AdvancedNumberInsightRequest, Credentials)

Retrieves advanced information about a phone number including validity and reachability. This synchronous method waits for the response. For high-volume usage, consider GetNumberInsightAsynchronousAsync(AdvancedNumberInsightAsynchronousRequest, Credentials) to avoid timeouts.

Task<AdvancedInsightsResponse> GetNumberInsightAdvancedAsync(AdvancedNumberInsightRequest request, Credentials creds = null)

Parameters

request AdvancedNumberInsightRequest

The request containing the phone number and lookup options. See AdvancedNumberInsightRequest.

creds Credentials

Optional credentials to override the default client credentials.

Returns

Task<AdvancedInsightsResponse>

An AdvancedInsightsResponse containing validity, reachability, and all standard insight data.

Examples

var request = new AdvancedNumberInsightRequest { Number = "447700900000" };
var response = await client.NumberInsightClient.GetNumberInsightAdvancedAsync(request);
See Also

GetNumberInsightAsynchronousAsync(AdvancedNumberInsightAsynchronousRequest, Credentials)

Retrieves advanced information about a phone number asynchronously via webhook callback. Recommended for production use to avoid timeouts on complex lookups.

Task<AdvancedInsightsAsynchronousResponse> GetNumberInsightAsynchronousAsync(AdvancedNumberInsightAsynchronousRequest request, Credentials creds = null)

Parameters

request AdvancedNumberInsightAsynchronousRequest

The request containing the phone number and callback URL. See AdvancedNumberInsightAsynchronousRequest.

creds Credentials

Optional credentials to override the default client credentials.

Returns

Task<AdvancedInsightsAsynchronousResponse>

An AdvancedInsightsAsynchronousResponse confirming the request was accepted. Full results are delivered to the callback URL.

Examples

var request = new AdvancedNumberInsightAsynchronousRequest
{
    Number = "447700900000",
    Callback = "https://example.com/webhooks/insight"
};
var response = await client.NumberInsightClient.GetNumberInsightAsynchronousAsync(request);
See Also

GetNumberInsightBasicAsync(BasicNumberInsightRequest, Credentials)

Retrieves basic information about a phone number including country and formatting details. This is the fastest and lowest-cost lookup option.

Task<BasicInsightResponse> GetNumberInsightBasicAsync(BasicNumberInsightRequest request, Credentials creds = null)

Parameters

request BasicNumberInsightRequest

The request containing the phone number to look up. See BasicNumberInsightRequest.

creds Credentials

Optional credentials to override the default client credentials.

Returns

Task<BasicInsightResponse>

A BasicInsightResponse containing country, carrier prefix, and number formatting information.

Examples

var request = new BasicNumberInsightRequest { Number = "447700900000" };
var response = await client.NumberInsightClient.GetNumberInsightBasicAsync(request);
See Also

GetNumberInsightStandardAsync(StandardNumberInsightRequest, Credentials)

Retrieves standard information about a phone number including carrier, porting, and roaming details. Provides more detail than basic lookup at additional cost.

Task<StandardInsightResponse> GetNumberInsightStandardAsync(StandardNumberInsightRequest request, Credentials creds = null)

Parameters

request StandardNumberInsightRequest

The request containing the phone number and optional CNAM lookup flag. See StandardNumberInsightRequest.

creds Credentials

Optional credentials to override the default client credentials.

Returns

Task<StandardInsightResponse>

A StandardInsightResponse containing carrier, porting status, roaming information, and optionally caller identity.

Examples

var request = new StandardNumberInsightRequest { Number = "447700900000", Cnam = true };
var response = await client.NumberInsightClient.GetNumberInsightStandardAsync(request);
See Also