generateToken method

  1. @android
  2. @override
Future<String?> generateToken({
  1. required String accountSid,
  2. required String apiKey,
  3. required String apiSecret,
  4. required String identity,
  5. required String serviceSid,
  6. required String pushSid,
})
override

Generate token and authenticate user (only for Android) #

Implementation

@TargetPlatform.android
@override
Future<String?> generateToken({required String accountSid,
  required String apiKey,
  required String apiSecret,
  required String identity,
  required String serviceSid,
  required String pushSid}) async {
  final accessToken = await methodChannel.invokeMethod<String>(
      'generateToken', {
    "accountSid": accountSid,
    "apiKey": apiKey,
    "apiSecret": apiSecret,
    "identity": identity,
    "serviceSid": serviceSid,
    "pushSid": pushSid
  });
  return accessToken;
}