# API Gateway 403 Forbidden

> 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.

Canonical: https://scaplet.com/errors/cdn/api-gateway-403-forbidden

Guide Error · CDN and hosting errors

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.

3 min

read

8

sources

Nov 1, 2026

updated

Scaplet Editorial Team

author

In one line

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.

30-second check

## Where does your site stand?

Four quick questions, then a straight answer.

1/4Have you checked your own site for this?

Summarize this page with [ChatGPT](https://chatgpt.com/?hints=search&q=Summarize%20https%3A%2F%2Fscaplet.com%2Ferrors%2Fcdn%2Fapi-gateway-403-forbidden%20(%22API%20Gateway%20403%20Forbidden%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [Claude](https://claude.ai/new?q=Summarize%20https%3A%2F%2Fscaplet.com%2Ferrors%2Fcdn%2Fapi-gateway-403-forbidden%20(%22API%20Gateway%20403%20Forbidden%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [Perplexity](https://www.perplexity.ai/search?q=Summarize%20https%3A%2F%2Fscaplet.com%2Ferrors%2Fcdn%2Fapi-gateway-403-forbidden%20(%22API%20Gateway%20403%20Forbidden%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [![Google](/logos/ai/google-color.svg)AI Mode](https://www.google.com/search?udm=50&q=Summarize%20https%3A%2F%2Fscaplet.com%2Ferrors%2Fcdn%2Fapi-gateway-403-forbidden%20(%22API%20Gateway%20403%20Forbidden%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.)

On this page

## 4 parts, 3 minutes.

1. [One status, many gateway responses 01](#one-status-many-gateway-responses)
2. [Find the cause in two minutes 02](#find-the-cause-in-two-minutes)
3. [Fix by cause 03](#fix-by-cause)
4. [SEO and crawler notes 04](#seo-and-crawler-notes)

_01_Gateway responses that default to 403

## One status, many gateway responses

A 403 from API Gateway is not one error. AWS defines a gateway response type for each denial, and several default to 403. Match the type to the cause before you change anything.

Type

### `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

Type

### `INVALID_API_KEY`

AWS description (shortened)

Invalid API key submitted for a method requiring one

First thing to check

The `x-api-key` header and usage plan

Type

### `ACCESS_DENIED`

AWS description (shortened)

Authorization failure, for example denied by a custom or Cognito authorizer

First thing to check

Authorizer policy and resource policy

Type

### `WAF_FILTERED`

AWS description (shortened)

Request blocked by AWS WAF

First thing to check

WAF web ACL rules

Type

### `EXPIRED_TOKEN`

AWS description (shortened)

An AWS authentication token expired

First thing to check

Clock and credential refresh

Type

### `INVALID_SIGNATURE`

AWS description (shortened)

Invalid AWS signature

First thing to check

SigV4 signing inputs

**Custom responses can hide the cause**AWS WAF custom responses take precedence over custom gateway responses, and changing `DEFAULT_4XX` changes the status of all other 4xx responses. If your 403 looks odd, check for customized gateway responses.

_02_How it works

## Find the cause in two minutes

Send a key and see the response

```
curl -i -H "x-api-key: YOUR_KEY" \ "https://abc123.execute-api.us-west-2.amazonaws.com/prod/getUsers"
```

1. 01

### Read the body

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.
2. 02

### Check the URL first

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.
3. 03

### Check the default endpoint

If someone disabled the default execute-api endpoint, clients "will receive a [403 Forbidden](/errors/http/403) [status code](/glossary/http-status-codes)" when calling it, and the change applies to all stages after a deployment. Use your custom domain name instead.
4. 04

### Turn on logs

Enable execution and access logging for the stage and read the gateway response type for the failing request.

_03_Cause, evidence and fix

## Fix by cause

Cause

### API key missing or wrong

Evidence

Method requires a key; `INVALID_API_KEY`

Fix

Send it in the `X-API-Key` header (key source `HEADER`) and make sure the key is in the usage plan

Cause

### Resource policy denies the caller

Evidence

Source IP, VPC or account not allowed

Fix

Add an explicit allow for the caller; an implicit or explicit deny denies the request

Cause

### Lambda authorizer returns Deny

Evidence

Authorizer returned a deny policy with a 200

Fix

Fix the policy; outside the test environment API Gateway returns 403

Cause

### Default endpoint disabled

Evidence

Custom domain works, execute-api URL gives 403

Fix

Call the custom domain, or set the default endpoint active and redeploy

Cause

### WAF blocks the request

Evidence

`WAF_FILTERED`

Fix

Review the web ACL rules

Resource policy that allows only listed IP ranges (from the AWS docs)

```
{ "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"] } } } ] }
```

Re-enable the default endpoint, then deploy

```
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 dev
```

With 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.

_04_Explained

## SEO and crawler notes

[Googlebot](/ai-crawlers/googlebot) never signs requests or sends keys. Google says it ignores content from 4xx URLs and that "Don't use 401 and 403 status codes for limiting the crawl rate." Keep public pages off a protected API, and for blocked bots use [429](/errors/http/429) or robots rules instead.

Sources · 8

## Every fact, linked and dated.

Official docs first. The date is when we last opened each page.

- rfc-editor.org
- amazon.com
- google.com

1. 01 [RFC 9110: HTTP Semantics](https://www.rfc-editor.org/rfc/rfc9110.html) rfc-editor.org · checked 2026-11-01
2. 02 [Gateway response types for API Gateway](https://docs.aws.amazon.com/apigateway/latest/developerguide/supported-gateway-response-types.html) docs.aws.amazon.com · checked 2026-11-01
3. 03 [Disable the default endpoint for REST APIs](https://docs.aws.amazon.com/apigateway/latest/developerguide/rest-api-disable-default-endpoint.html) docs.aws.amazon.com · checked 2026-11-01
4. 04 [Choose an API key source in API Gateway](https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-api-key-source.html) docs.aws.amazon.com · checked 2026-11-01
5. 05 [How API Gateway resource policies affect authorization workflow](https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-authorization-flow.html) docs.aws.amazon.com · checked 2026-11-01
6. 06 [Use API Gateway Lambda authorizers](https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-use-lambda-authorizer.html) docs.aws.amazon.com · checked 2026-11-01
7. 07 [Invoke REST APIs in API Gateway](https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-call-api.html) docs.aws.amazon.com · checked 2026-11-01
8. 08 [How HTTP status codes affect Google's crawlers](https://developers.google.com/crawling/docs/troubleshooting/http-status-codes) developers.google.com · checked 2026-11-01

Questions

## Asked a lot.

3 questions people ask next, answered from the sources on this page.

_01_ Why does API Gateway say Missing Authentication Token?

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](/glossary/entity) to rule out.

_02_ Why do I get 403 on the default execute-api URL but not my custom domain?

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.

_03_ Does an API key problem return 403?

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.

## Keep learning

[All errors](/errors)

[Learn S3 Access Denied (403 Forbidden) CDN and hosting errors](/errors/cdn/s3-access-denied) [Related 4xx errors Status codes and links](/seo-issues/4xx-errors) [Read next 403 Forbidden HTTP status codes](/errors/http/403) [Do Run a free site audit Free, about two minutes](/site-audit)

Other 403 errors
[403 Forbidden in WordPress](/errors/http/403/wordpress) [403 Forbidden on Cloudflare](/errors/http/403/cloudflare) [403 Forbidden on CloudFront](/errors/http/403/cloudfront) [S3 Access Denied (403 Forbidden)](/errors/cdn/s3-access-denied) [403 Forbidden](/errors/http/403)

More Api errors
[API Gateway 504 Gateway Timeout](/errors/cdn/api-gateway-504)

More in CDN and hosting errors
[Render 502 Bad Gateway](/errors/cdn/render-502) [S3 Access Denied (403 Forbidden)](/errors/cdn/s3-access-denied) [Vercel 413: FUNCTION_PAYLOAD_TOO_LARGE](/errors/cdn/vercel-payload-too-large) [Vercel 429: Too Many Requests](/errors/cdn/vercel-429) [Vercel 500: Internal Server Error](/errors/cdn/vercel-500) [Vercel build failed](/errors/cdn/vercel-build-failed) [Vercel domain not working](/errors/cdn/vercel-domain-not-working) [Vercel FUNCTION_INVOCATION_TIMEOUT](/errors/cdn/vercel-function-invocation-timeout) [Vercel: too many redirects](/errors/cdn/vercel-too-many-redirects) [Akamai reference number](/errors/cdn/akamai-reference-number) [ALB 503 Service Unavailable](/errors/cdn/alb-503) [ALB 504 Gateway Timeout](/errors/cdn/alb-504-gateway-timeout) [API Gateway 403 Forbidden](/errors/cdn/api-gateway-403-forbidden) [API Gateway 504 Gateway Timeout](/errors/cdn/api-gateway-504) [AWS 502 Bad Gateway](/errors/cdn/aws-502-bad-gateway) [AWS Amplify 404 Not Found](/errors/cdn/amplify-404) [AWS EC2: Connection timed out](/errors/cdn/aws-ec2-connection-timed-out) [AWS Lambda 502 Bad Gateway](/errors/cdn/aws-lambda-502) [AWS Lambda timeout](/errors/cdn/lambda-timeout) [Azure Front Door 502](/errors/cdn/azure-front-door-502) [Cloud Run 503 error](/errors/cdn/cloud-run-503) [Cloudflare 504 Gateway Timeout](/errors/cdn/cloudflare-504) [Cloudflare Pages 404 Not Found](/errors/cdn/cloudflare-pages-404) [Cloudflare too many redirects (ERR_TOO_MANY_REDIRECTS)](/errors/cdn/cloudflare-too-many-redirects)

Terms on this page
[HTTP status codes](/glossary/http-status-codes) [Entity](/glossary/entity)

Free · 2 minutes

## Tools point. Agencies advise. _This one ships._

Run the free audit, then approve the fixes. Every change can be undone.

[Audit my site free](/site-audit)

Free, no card 60 seconds Nobody will call you

- **46** fixes shipped without a ticket Brightpipe
- **0→7** ChatGPT citations in six weeks Paylane
