getVerificationSession method

  1. @override
Future<Map<String, dynamic>> getVerificationSession(
  1. String sessionId
)
override

Get verification session by ID

Implementation

@override
Future<Map<String, dynamic>> getVerificationSession(String sessionId) async {
  try {
    final response = await http.get(
      Uri.parse('$_sotaidApiUrl/verification_sessions/$sessionId'),
      headers: getHeaders(),
    );

    if (response.statusCode == 200) {
      return jsonDecode(response.body);
    } else {
      throw Exception('Failed to get verification session: ${response.statusCode}');
    }
  } catch (e) {
    throw Exception('Error getting verification session: $e');
  }
}