I am trying to create a small API in Flask requiring two different parameters. A ticker and a key (for authentication).
Here is how my route is defined:
api_bp = Blueprint("api", __name__, url_prefix="/api")
@api_bp.route("/1.0/<string:ticker>?key=<string:key>", methods=["GET"])
def some_function(ticker:str, key:str):
...
However I am getting a 404 not found error. When I remove the second part and make the url just:
@api_bp.route("/1.0/<string:ticker>", methods=["GET"])
everything works fine. Why is this?