def METHOD_NAME() -> Response:
    """Request to be added to a group."""
    form = request.form
    group_id = form["group"]
    def __error__(error):
        err = process_error(error)
        flash(f"{err['error']}: {err['error_message']}", "alert-danger")
        return redirect(url_for("oauth2.user.user_profile"))
    def __success__(response):
        flash(f"{response['message']} (Response ID: {response['request_id']})",
              "alert-success")
        return redirect(url_for("oauth2.user.user_profile"))
    return oauth2_post(f"oauth2/group/requests/join/{group_id}",
                       data=form).either(__error__, __success__)