sendLoginLink method
Submit email for login. Backend auto-detects if account exists and adjusts token type accordingly. Response is always {ok:true}.
Sign the provided TSendLoginLinkBody with the client's stamp function and submit the request (POST /public/v1/send_login_link).
See also: stampSendLoginLink.
Implementation
Future<TSendLoginLinkResponse> sendLoginLink({
required TSendLoginLinkBody input,
}) async {
final body = packActivityBody(
bodyJson: input.toJson(),
fallbackOrganizationId: input.organizationId ??
config.organizationId ??
(throw Exception(
"Missing organization ID, please pass in a sub-organizationId or instantiate the client with one.")),
activityType: 'ACTIVITY_TYPE_SEND_LOGIN_LINK',
);
return await request<Map<String, dynamic>, TSendLoginLinkResponse>(
"/public/v1/send_login_link",
body,
(json) => TSendLoginLinkResponse.fromJson(
transformActivityResponse(json, 'SendLoginLink')));
}