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.

已提問 1 年前檢視次數 8225 次
2 個答案
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
已回答 1 年前
  • 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
已回答 1 年前
  • 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.

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南