> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tinycloud.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Delegations & Sharing

> Grant scoped access and exchange share links

Use delegations when another DID needs access to a path in your space. Use share links when you want a simpler handoff that can be accepted later.

## Create a delegation

```bash theme={null}
tc delegation create \
  --to did:pkh:eip155:1:0xRecipient... \
  --path documents/ \
  --actions kv/get,kv/list \
  --expiry 7d
```

The CLI prefixes short actions with `tinycloud.` automatically, so `kv/get` becomes `tinycloud.kv/get`.

## Inspect and revoke

```bash theme={null}
tc delegation list
tc delegation list --granted
tc delegation list --received
tc delegation info bafy...
tc delegation revoke bafy...
```

## Share links

```bash theme={null}
tc share create --path documents/report.json --actions kv/get --expiry 24h
tc share receive https://node.tinycloud.xyz/share/...
```

Share links are built on delegations. The CLI's `share receive` command still
requires an authenticated TinyCloud profile. For accountless browser receipt,
use the Web SDK's static `TinyCloudWeb.receiveShare()` helper.

<Warning>
  In `@tinycloud/cli` 0.7.7, `tc share list` and `tc share revoke` appear
  in command help but are not backed by working SDK operations. Do not rely on
  them. Use a short expiry, or retain the underlying delegation CID and revoke it
  through the SDK as shown in [Sharing links](/guides/sharing).
</Warning>

## DID and expiry rules

* Use a PKH DID for user-to-user delegations
* `did:key` is for session-key style identities
* Expiry can be relative (`1h`, `7d`) or an absolute ISO timestamp

<Note>
  The CLI source treats `delegation create` as the primitive, and `share` as a convenience flow on top of it.
</Note>
