def METHOD_NAME(email: str, expiry: int):
	assert isinstance(email, str)
	if not frappe.db.exists("User", email):
		frappe.throw(
			_("User with email address {0} does not exist").format(email), frappe.DoesNotExistError
		)
	key = frappe.generate_hash()
	frappe.cache.set_value(f"one_time_login_key:{key}", email, expires_in_sec=expiry * 60)
	return get_url(f"/api/method/frappe.www.login.login_via_key?key={key}")