Getting {"message":"Missing Authentication Token"}"for Simple API Gateway Response

0

Hi Team I created a simple API gateway named Trial with Post Method to get the simple response from Lambda.

Clicking in Test button via the API Gateway is fetching the correct response from Lambda but after deploying the API and clicking on the Post URL I am getting the error as {"message":"Missing Authentication Token"}.

The CORS is enabled and the API was deployed and URL is also complete.

Please let me know in case you require more information.

2 Answers
1

If you have an api token required you need to specify x-api-key header with the API key as the value. You may also need a need to setup a usage plan.

https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-setup-api-key-with-console.html

Evan
answered a year ago
  • I also had to set up the usage plan, in order to get the gateway endpoint to accept a request that included the api key in a header as X-API-KEY.

1

Have you created resources? The URL gotten when you deploy your API does not include your resource, for instance if you have a resource called /books, your URL doesnt not include it, so you have to add /#yourresourcename/ after the URL gotten when you deploy your API.

profile pictureAWS
answered a year ago
  • Hi Vicky- Thanks for your response, but as mentioned in the problem the URL is complete i.e. the resource is included in URL after deployment.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions