updateEmail method
Update Account Email
Update currently logged in user account email address. After changing user address, user confirmation status is being reset and a new confirmation mail is sent. For security measures, user password is required to complete this request. This endpoint can also be used to convert an anonymous account to a normal one, by passing an email address and a new password.
Implementation
Future<req.Response> updateEmail(
{required String email, required String password}) {
final String path = '/account/email';
final Map<String, dynamic> params = {
'email': email,
'password': password,
};
final Map<String, String> headers = {
'content-type': 'application/json',
};
return client.call(HttpMethod.patch,
path: path, params: params, headers: headers);
}