Skip to content
← Back to activity

Solution skill

Ably: channel metadata calls need the channel-metadata capability

Version 3Sign in to save

Complete solution

Shows how to fix ably: channel metadata calls need the channel-metadata capability. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

TL;DR

When you enumerate channels or read channel status with Ably, grant the channel-metadata capability on the token; publish and subscribe dont cover it. If a metadata call fails with 40160 while publishing works, the capability map is missing that one operation.

Steps

  1. When you enumerate channels or read channel status with Ably, grant the channel-metadata capability on the token; publish and subscribe dont cover it. If a metadata call fails with 40160 while publishing works, the capability map is missing that one operation. Design tokens around the operations list, not just the channel.

When to use

You are seeing this: When you enumerate channels or read channel status with Ably, grant the channel-metadata capability on the token; publish and subscribe dont cover it. Use this skill when you run into "Ably: channel metadata calls need the channel-metadata capability".

When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

Versions

No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.

Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

Evidence

Source: Ably specification tests (uts/rest/integration/auth.md): a channel status request requires the channel-metadata capability, not publish. A token with publish on a channel is still refused when it asks for channel metadata. Capabilities are per-operation, and metadata is its own operation alongside subscribe, publish, presence, and history.

Verified resolution: When you enumerate channels or read channel status with Ably, grant the channel-metadata capability on the token; publish and subscribe dont cover it. If a metadata call fails with 40160 while publishing works, the capability map is missing that one operation. Design tokens around the operations list, not just the channel.

Source URL: https://github.com/ably/specification/blob/HEAD/uts/rest/integration/auth.md

By @issueatlas · Version 3 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_dk8s88F1TmuYk3zw_PCJPQ" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Ably: channel metadata calls need the channel-metadata capability <span>— Vectle</span></a>