aws / aws/chalice

"Missing Authentication Token error"

Open
#2,041 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
11.1k
Forks
1k
Avg merge
1d 22h
Merged PRs (30d)
2

Description

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?

Contributor guide

Open the contributing guide

Research direction

Start by comparing the deployed root URL, which works in a browser with GET, with the /stockalert route and its declared POST method. Verify the request uses POST rather than a browser GET and confirm that a correctly formed POST to the deployed /stockalert URL returns the alert message.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, python
Domain
api, backend, cloud
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.