FaceSessionClient.GetLivenessWithVerifySessionResult Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
GetLivenessWithVerifySessionResult(String, CancellationToken) |
Please refer to https://learn.microsoft.com/rest/api/face/liveness-session-operations/get-liveness-with-verify-session-result for more details. |
GetLivenessWithVerifySessionResult(String, RequestContext) |
[Protocol Method] Please refer to https://learn.microsoft.com/rest/api/face/liveness-session-operations/get-liveness-with-verify-session-result for more details.
|
GetLivenessWithVerifySessionResult(String, CancellationToken)
- Source:
- FaceSessionClient.cs
Please refer to https://learn.microsoft.com/rest/api/face/liveness-session-operations/get-liveness-with-verify-session-result for more details.
public virtual Azure.Response<Azure.AI.Vision.Face.LivenessWithVerifySession> GetLivenessWithVerifySessionResult (string sessionId, System.Threading.CancellationToken cancellationToken = default);
abstract member GetLivenessWithVerifySessionResult : string * System.Threading.CancellationToken -> Azure.Response<Azure.AI.Vision.Face.LivenessWithVerifySession>
override this.GetLivenessWithVerifySessionResult : string * System.Threading.CancellationToken -> Azure.Response<Azure.AI.Vision.Face.LivenessWithVerifySession>
Public Overridable Function GetLivenessWithVerifySessionResult (sessionId As String, Optional cancellationToken As CancellationToken = Nothing) As Response(Of LivenessWithVerifySession)
Parameters
- sessionId
- String
The unique ID to reference this session.
- cancellationToken
- CancellationToken
The cancellation token to use.
Returns
Exceptions
sessionId
is null.
sessionId
is an empty string, and was expected to be non-empty.
Examples
This sample shows how to call GetLivenessWithVerifySessionResult.
Uri endpoint = new Uri("<endpoint>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
FaceSessionClient client = new FaceSessionClient(endpoint, credential);
Response<LivenessWithVerifySession> response = client.GetLivenessWithVerifySessionResult("b12e033e-bda7-4b83-a211-e721c661f30e");
Applies to
GetLivenessWithVerifySessionResult(String, RequestContext)
- Source:
- FaceSessionClient.cs
[Protocol Method] Please refer to https://learn.microsoft.com/rest/api/face/liveness-session-operations/get-liveness-with-verify-session-result for more details.
- This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
- Please try the simpler GetLivenessWithVerifySessionResult(String, CancellationToken) convenience overload with strongly typed models first.
public virtual Azure.Response GetLivenessWithVerifySessionResult (string sessionId, Azure.RequestContext context);
abstract member GetLivenessWithVerifySessionResult : string * Azure.RequestContext -> Azure.Response
override this.GetLivenessWithVerifySessionResult : string * Azure.RequestContext -> Azure.Response
Public Overridable Function GetLivenessWithVerifySessionResult (sessionId As String, context As RequestContext) As Response
Parameters
- sessionId
- String
The unique ID to reference this session.
- 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
sessionId
is null.
sessionId
is an empty string, and was expected to be non-empty.
Service returned a non-success status code.
Examples
This sample shows how to call GetLivenessWithVerifySessionResult and parse the result.
Uri endpoint = new Uri("<endpoint>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
FaceSessionClient client = new FaceSessionClient(endpoint, credential);
Response response = client.GetLivenessWithVerifySessionResult("b12e033e-bda7-4b83-a211-e721c661f30e", null);
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("id").ToString());
Console.WriteLine(result.GetProperty("createdDateTime").ToString());
Console.WriteLine(result.GetProperty("sessionExpired").ToString());
Console.WriteLine(result.GetProperty("status").ToString());