createToken method

Future<CreateTokenResponse> createToken({
  1. required String appId,
})

Generates a one-time challenge code to authenticate a user into your Amplify Admin UI.

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

Parameter appId : The app ID.

Implementation

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