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.

preguntada hace un año8220 visualizaciones
2 Respuestas
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
respondido hace un año
  • 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
respondido hace un año
  • 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.

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas