MISSING_AUTHENTICATION_TOKEN
- AWS description (shortened)
- Missing authentication token, including calls to an unsupported API method or resource
- First thing to check
- The URL, stage and HTTP method
Work out which API Gateway response type is behind your 403: missing token, invalid API key, resource policy, WAF, authorizer or a disabled default endpoint.
API Gateway returns 403 for many different reasons, each with its own gateway response type: MISSING_AUTHENTICATION_TOKEN, INVALID_API_KEY, ACCESS_DENIED, WAF_FILTERED, EXPIRED_TOKEN and more. Read the message and response type first, then check the resource policy, API key, authorizer or the disabled default endpoint that matches it.
Four quick questions, then a straight answer.
From your answers, this is quietly costing you traffic and nobody has the hours to chase it. Scaplet finds every affected page, drafts the fixes and tracks how AI answers mention you.
A data platform shipped 46 fixes without a ticket.
This looks handled. Re-check after a redesign, a migration or a big content push; that is when it breaks.
Your site is small and you have the time. Work through the steps on this page, starting with the pages that get the most traffic.
MISSING_AUTHENTICATION_TOKENINVALID_API_KEYx-api-key header and usage planACCESS_DENIEDWAF_FILTEREDEXPIRED_TOKENINVALID_SIGNATUREcurl -i -H "x-api-key: YOUR_KEY" \
"https://abc123.execute-api.us-west-2.amazonaws.com/prod/getUsers"The default error body names the problem. Call the route with curl -i https://api-id.execute-api.region.amazonaws.com/stage/path and read the message.
The base URL is https://api-id.execute-api.region.amazonaws.com/stage/. A wrong stage, path or method is documented as a MISSING_AUTHENTICATION_TOKEN case, so it is the cheapest fix.
If someone disabled the default execute-api endpoint, clients "will receive a 403 Forbidden status code" when calling it, and the change applies to all stages after a deployment. Use your custom domain name instead.
Enable execution and access logging for the stage and read the gateway response type for the failing request.
INVALID_API_KEYX-API-Key header (key source HEADER) and make sure the key is in the usage planWAF_FILTERED{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": "*",
"Action": "execute-api:Invoke",
"Resource": "arn:aws:execute-api:us-east-1:111111111111:api-id/",
"Condition": {
"IpAddress": {
"aws:SourceIp": ["192.0.2.0/24", "198.51.100.0/24"]
}
}
}
]
}aws apigateway update-rest-api --rest-api-id abcdef123 \
--patch-operations op=replace,path=/disableExecuteApiEndpoint,value='False'
aws apigateway create-deployment --rest-api-id abcdef123 --stage-name devWith IAM authentication plus a resource policy, same-account callers need either the IAM policy or the resource policy to allow; cross-account callers need both.
3 questions people ask next, answered from the sources on this page.
AWS documents MISSING_AUTHENTICATION_TOKEN as a missing token error, including when a client calls an unsupported API method or resource. A wrong path, stage or method is the first thing to rule out.
The default endpoint may be disabled. AWS says clients can still connect to it but receive a 403 Forbidden status code. Redeploy after changing the setting.
Yes. When an API key does not match the usage plan, API Gateway throws an InvalidKeyParameter exception and the caller receives a 403 Forbidden response.
Run the free audit, then approve the fixes. Every change can be undone.