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개 답변
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
답변함 일 년 전
  • 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
답변함 일 년 전
  • 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.

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠