How do I troubleshoot API Gateway REST API endpoint 403 "Missing Authentication Token" errors?
"When I try to invoke my Amazon API Gateway REST API, I get 403 "Missing Authentication Token" error messages. How do I troubleshoot these errors?"
"When I try to invoke my Amazon API Gateway REST API, I get 403 "Missing Authentication Token" error messages. How do I troubleshoot these errors?Short descriptionAPI Gateway REST API endpoints return Missing Authentication Token errors for the following reasons:The API request is made to a method or resource that doesn't exist.The API request isn't signed when the API method has AWS Identity and Access Management (IAM) authentication turned on.The API might be configured with a modified Gateway response or the response comes from a backend integration.To troubleshoot other 403 errors for API Gateway, see How do I troubleshoot HTTP 403 errors from API Gateway?ResolutionConfirm that there's a method and resource configured in the API Gateway resource pathFollow the instructions in Set up a method using the API Gateway console. For more information, see Set up API resources.Important: You must deploy the API for the changes to take effect.For APIs with proxy resource integration where the request method is sent to the root resource, verify that there's a method configured under the root resource.Confirm that the API Gateway responses haven't been modified or the backend integration isn't sending the responseMake sure that the gateway responses aren't modified in the API. Also, make sure that the error isn't coming from the integration backend. Check the API Gateway execution logs and backend logs.Confirm that the API request is signed if the API method has IAM authentication turned onFor more information, see Signing AWS API requests and Elements of an AWS API request signature.Confirm that you're sending the correct HTTP method request to the REST API endpointTesting a REST API endpoint from a web browser automatically sends a GET HTTP method request.To test a POST HTTP method request, use a different HTTP client. For example: Postman or curl.Example curl command that uses the POST HTTP method request$ curl -X POST  <API URL> -d <request body>Example sending request with JSON header$ curl --location -X POST 'https://1234WXYZ.execute-api.us-east-1.amazonaws.com/stage/lambda_proxy' --header 'Content-Type: application/json' --data-raw '{"x":"y"}'Examples sending curl POST request with AWS V4 signature authentication$ curl -X POST "<ENDPOINT>" -d <data> --user <AWS_ACCESS_KEY>:<AWS_SECRET_KEY> --aws-sigv4 "aws:amz:<REGION>:<SERVICE>"$ curl -X POST "https://1234WXYZ.execute-api.us-east-1.amazonaws.com/stage/lambda_proxy" -d '{"x":"y"}' --user ABCD:1234 --aws-sigv4 "aws:amz:us-east-1:execute-api"Related informationHow do I activate IAM authentication for API Gateway REST APIs?Follow"