aws / chalice

Python Serverless Microframework for AWS
Apache License 2.0
10.67k stars 1.01k forks source link

"Missing Authentication Token error" #2041

Open SRS625 opened 1 year ago

SRS625 commented 1 year ago

Hi I am having an issue that is drivin me crazy and I cant solve. I am new to using chalice to please bear with me. When i deploy and run chalice the following code works when I open up a web browser and use the URL: @app.route('/') def index(): return {'hello': 'world'}

it shows hello world.

However, when I try to set it up to receive a POST the web browser shows "Missing Authentication Token" @app.route('/stockalert', methods=['POST']) def stock_alert():

return {
    "message": "An alert occured"
    }

And yes I did add stockalert to the end of the URL and it still didnt work. Anyone have any idea why this is happening?

jaeyoung0509 commented 1 year ago

Usually, this message occurs when the blueprint is not correctly registered or when a wrong URL is called. I recommend checking whether the blueprint is properly registered and if the URL is correct