Skip to content

Cloudflare Tunnel Documentation contains incorrect command to PUT configuration #23461

@scubbo

Description

@scubbo

Existing documentation URL(s)

What changes are you suggesting?

$  curl "https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/cfd_tunnel/$TUNNEL_ID/configurations" \
  --request PUT \
  --header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
  --json '{
    "config": {
        "ingress": [
            {
                "hostname": "example.org",
                "service": "http://localhost:8001",
                "originRequest": {}
            },
            {
                "service": "http_status:404"
            }
        ]
    }
  }'
{"success":false,"errors":[{"code":10000,"message":"PUT method not allowed for the api_token authentication scheme"}]}

I assume this means that I should use the Global API Key, but this also fails:

$ curl "https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/cfd_tunnel/$TUNNEL_ID/configurations" \
  --request PUT \
  --header "X-Auth-Email: $MY_CLOUDFLARE_EMAIL" \
  --header "X-Auth-Key: $CLOUDFLARE_API_KEY" \
  --json '{
    "config": {
        "ingress": [
            {
                "hostname": "example.org",
                "service": "http://localhost:8001",
                "originRequest": {}
            },
            {
                "service": "http_status:404"
            }
        ]
    }
  }'
{"success":false,"errors":[{"code":1089,"message":"Method Not Allowed"}],"messages":[],"result":null}%

Additional information

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions