Interface IIdentityInsightsClient
- Namespace
- Vonage.IdentityInsights
- Assembly
- Vonage.dll
Client for retrieving identity insights about phone numbers including format validation, carrier information, and SIM swap detection.
public interface IIdentityInsightsClient
Methods
GetInsightsAsync(Result<GetInsightsRequest>)
Retrieves multiple phone number insights (format validation, carrier information, SIM swap status) in a single request.
Task<Result<GetInsightsResponse>> GetInsightsAsync(Result<GetInsightsRequest> request)
Parameters
requestResult<GetInsightsRequest>The request containing the phone number and desired insights.
Returns
- Task<Result<GetInsightsResponse>>
Success with a GetInsightsResponse containing the requested insights, or Failure if the request is invalid or the API call fails.
Examples
var request = GetInsightsRequest.Build()
.WithPhoneNumber("+14155552671")
.WithFormat()
.WithSimSwap(new SimSwapRequest(24))
.Create();
var response = await client.GetInsightsAsync(request);
- See Also
WithEuRegion()
Returns a new client configured to use the Identity Insights API in the EU region.
IIdentityInsightsClient WithEuRegion()
Returns
- IIdentityInsightsClient
A new IIdentityInsightsClient instance targeting the EU region.
Examples
var euClient = client.WithEuRegion();
var response = await euClient.GetInsightsAsync(request);