getToken method

Future<GetTokenResponse> getToken({
  1. required String appId,
  2. required String sessionId,
})

Gets the challenge token based on the given appId and sessionId.

May throw BadRequestException. May throw GatewayTimeoutException. May throw NotFoundException. May throw TooManyRequestsException.

Parameter appId : The app ID.

Parameter sessionId : The session ID.

Implementation

Future<GetTokenResponse> getToken({
  required String appId,
  required String sessionId,
}) async {
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri:
        '/backend/${Uri.encodeComponent(appId)}/challenge/${Uri.encodeComponent(sessionId)}',
    exceptionFnMap: _exceptionFns,
  );
  return GetTokenResponse.fromJson(response);
}