Skip to content

Pipelines API rejects every API token with "Forbidden [code: 100]" — only OAuth works #14741

Description

@roman-ternovyi

What versions & operating system are you using?

wrangler 4.39.0 (also reproduced against the REST API directly), macOS, Node 24

Please provide a link to a minimal reproduction

No custom code needed — reproduced with wrangler alone, see below.

Describe the Bug

wrangler pipelines streams list fails with Forbidden [code: 100] when authenticated
with an API token, and succeeds with OAuth — same command, same account, same
minute. The API token is valid, scoped to that exact account, and carries
Workers Pipelines: Send, Edit, Read.

Reproduction

export CLOUDFLARE_ACCOUNT_ID=<account-id>

# 1. OAuth — works
npx wrangler@4.39.0 login
npx wrangler@4.39.0 pipelines streams list
# -> No streams found.

# 2. Same command, API token — fails
export CLOUDFLARE_API_TOKEN=<token with Workers Pipelines: Send, Edit, Read>
npx wrangler@4.39.0 pipelines streams list
# -> ✘ [ERROR] A request to the Cloudflare API
#      (/accounts/<account-id>/pipelines/v1/streams) failed.
#    Forbidden [code: 100]

The token is valid and its permissions demonstrably work

curl -s https://api.cloudflare.com/client/v4/user/tokens/verify \
  -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN"
# -> "success": true, "result": { "status": "active" }

# Account Settings:Read on the SAME token works:
curl -s https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID \
  -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN"
# -> 200 OK

# Workers Pipelines:Read on the same token does not:
curl -s https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/pipelines/v1/streams \
  -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN"
# -> 403 {"code": 100, "message": "Forbidden"}

So the token is live, correctly scoped, and one of its permissions is honoured while
Workers Pipelines is not.

Evidence matrix

Client Credential Account scope Permissions Result
wrangler 4.39.0 OAuth pipelines:write 200 OK
wrangler 4.39.0 API token cfut_ specific account Pipelines Send+Edit+Read 403 code 100
REST (curl/axios) OAuth token pipelines:write 200 OK
REST API token cfut_ specific account Pipelines Send+Edit+Read 403 code 100
REST API token cfut_ specific account + Account Settings: Read 403 code 100
REST API token cfut_ All accounts Pipelines Send+Edit+Read 403 code 100
REST Account token cfat_ account-owned Pipelines Send+Edit+Read 403 code 100

Ruled out

  • Permissions — tried Send/Edit/Read and + Account Settings: Read.
    "npx wrangler pipelines setup" failed #11786 reports the same failure with eight permission groups.
  • Token type — both user-owned (cfut_) and account-owned (cfat_) fail.
  • Account scope — both "All accounts" and a specific account fail.
  • Account entitlement — the dashboard's Create Pipeline wizard works on this
    account, and OAuth reads /pipelines/v1/streams fine.
  • Request shapeWRANGLER_LOG=debug WRANGLER_LOG_SANITIZE=false shows wrangler
    issuing exactly GET /accounts/<id>/pipelines/v1/streams?page=1&per_page=20 with no
    extra headers beyond user-agent. Our REST call is byte-identical.
  • User-agent — sending user-agent: wrangler/4.39.0 with the API token changes
    nothing; sending a plain UA with the OAuth token still works.

The only variable that changes the outcome is the credential type.

Expected

An API token with Workers Pipelines: Read scoped to the account can list streams.

Actual

Every API token gets Forbidden [code: 100]. Only OAuth works — which makes the
Pipelines API unusable from CI or any non-interactive deployment.

Notes

Please provide any relevant error logs

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    awaiting-response:cloudflareAwaiting response from the workers-sdk maintainer teaminternalRequires support from the Cloudflare Platformproduct:pipelinesRelating to Cloudflare Pipelines: https://developers.cloudflare.com/pipelines/

    Type

    Fields

    No fields configured for Bug.

    Projects

    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions