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 réponses
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
répondu il y a un an
  • 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
répondu il y a un an
  • 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.

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions