vrchat_dart 0.1.0 copy "vrchat_dart: ^0.1.0" to clipboard
vrchat_dart: ^0.1.0 copied to clipboard

outdated

This is a Dart client that interacts with the unofficial VRChat API

example/main.dart

import 'package:vrchat_dart/vrchat_dart.dart';

main() async {
  final api = VrchatDart().api;

  final loginResponse = await api.login('example', 'hunter2');

  if (loginResponse.authError) {
    print('authError');
  } else if (loginResponse.requiresTwoFactorAuth) {
    print('requiresTwoFactorAuth');
    final twoFactorResponse = await api.verify2fa('123456');
    if (twoFactorResponse) {
      print('2fa verification success');
    } else {
      print('2fa verification failure');
    }
  } else {
    print('Logged in');
  }
}