Partilhar via


NumberVerification.VerifyWithoutCode Method

Definition

Overloads

VerifyWithoutCode(String, NumberVerificationWithoutCodeContent, CancellationToken)

Verifies the phone number (MSISDN) associated with a device. As part of the frontend authorization flow, the device is redirected to the operator network to authenticate directly.

VerifyWithoutCode(String, RequestContent, RequestContext)

[Protocol Method] Verifies the phone number (MSISDN) associated with a device. As part of the frontend authorization flow, the device is redirected to the operator network to authenticate directly.

VerifyWithoutCode(String, NumberVerificationWithoutCodeContent, CancellationToken)

Source:
NumberVerification.cs

Verifies the phone number (MSISDN) associated with a device. As part of the frontend authorization flow, the device is redirected to the operator network to authenticate directly.

public virtual Azure.Response VerifyWithoutCode (string apcGatewayId, Azure.Communication.ProgrammableConnectivity.NumberVerificationWithoutCodeContent numberVerificationWithoutCodeContent, System.Threading.CancellationToken cancellationToken = default);
abstract member VerifyWithoutCode : string * Azure.Communication.ProgrammableConnectivity.NumberVerificationWithoutCodeContent * System.Threading.CancellationToken -> Azure.Response
override this.VerifyWithoutCode : string * Azure.Communication.ProgrammableConnectivity.NumberVerificationWithoutCodeContent * System.Threading.CancellationToken -> Azure.Response
Public Overridable Function VerifyWithoutCode (apcGatewayId As String, numberVerificationWithoutCodeContent As NumberVerificationWithoutCodeContent, Optional cancellationToken As CancellationToken = Nothing) As Response

Parameters

apcGatewayId
String

The identifier of the APC Gateway resource which should handle this request.

numberVerificationWithoutCodeContent
NumberVerificationWithoutCodeContent

Request to verify number of device - first call.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

apcGatewayId or numberVerificationWithoutCodeContent is null.

Examples

This sample shows how to call VerifyWithoutCode.

Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "2024-02-09-preview");

NumberVerificationWithoutCodeContent numberVerificationWithoutCodeContent = new NumberVerificationWithoutCodeContent(new NetworkIdentifier("<identifierType>", "<identifier>"), new Uri("http://localhost:3000"));
Response response = client.VerifyWithoutCode("<apcGatewayId>", numberVerificationWithoutCodeContent);

This sample shows how to call VerifyWithoutCode with all parameters.

Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "2024-02-09-preview");

NumberVerificationWithoutCodeContent numberVerificationWithoutCodeContent = new NumberVerificationWithoutCodeContent(new NetworkIdentifier("<identifierType>", "<identifier>"), new Uri("http://localhost:3000"))
{
    PhoneNumber = "<phoneNumber>",
    HashedPhoneNumber = "<hashedPhoneNumber>",
};
Response response = client.VerifyWithoutCode("<apcGatewayId>", numberVerificationWithoutCodeContent);

Applies to

VerifyWithoutCode(String, RequestContent, RequestContext)

Source:
NumberVerification.cs

[Protocol Method] Verifies the phone number (MSISDN) associated with a device. As part of the frontend authorization flow, the device is redirected to the operator network to authenticate directly.

public virtual Azure.Response VerifyWithoutCode (string apcGatewayId, Azure.Core.RequestContent content, Azure.RequestContext context = default);
abstract member VerifyWithoutCode : string * Azure.Core.RequestContent * Azure.RequestContext -> Azure.Response
override this.VerifyWithoutCode : string * Azure.Core.RequestContent * Azure.RequestContext -> Azure.Response
Public Overridable Function VerifyWithoutCode (apcGatewayId As String, content As RequestContent, Optional context As RequestContext = Nothing) As Response

Parameters

apcGatewayId
String

The identifier of the APC Gateway resource which should handle this request.

content
RequestContent

The content to send as the body of the request.

context
RequestContext

The request context, which can override default behaviors of the client pipeline on a per-call basis.

Returns

The response returned from the service.

Exceptions

apcGatewayId or content is null.

Service returned a non-success status code.

Examples

This sample shows how to call VerifyWithoutCode.

Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "2024-02-09-preview");

using RequestContent content = RequestContent.Create(new
{
    networkIdentifier = new
    {
        identifierType = "<identifierType>",
        identifier = "<identifier>",
    },
    redirectUri = "http://localhost:3000",
});
Response response = client.VerifyWithoutCode("<apcGatewayId>", content);

Console.WriteLine(response.Status);

This sample shows how to call VerifyWithoutCode with all parameters and request content.

Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "2024-02-09-preview");

using RequestContent content = RequestContent.Create(new
{
    networkIdentifier = new
    {
        identifierType = "<identifierType>",
        identifier = "<identifier>",
    },
    phoneNumber = "<phoneNumber>",
    hashedPhoneNumber = "<hashedPhoneNumber>",
    redirectUri = "http://localhost:3000",
});
Response response = client.VerifyWithoutCode("<apcGatewayId>", content);

Console.WriteLine(response.Status);

Applies to