Skip to main content
Delegations let you grant scoped, time-limited access to your space. Share links provide a simpler flow for sharing data with users who may not have a TinyCloud identity yet.

Delegations

tc delegation create

Create a delegation granting another user access to your space.
tc delegation create --to <did> --path <path> --actions <actions> [options]
OptionDescriptionExample
--to <did>Recipient’s DID (PKH or key format)did:pkh:eip155:1:0xd8dA...
--actions <actions>Comma-separated actions to grantkv/get,kv/put
--path <path>KV path scopedocuments/
--expiry <duration>How long the delegation is valid7d

Action Formats

Actions follow the {namespace}/{action} format. You can use the full or short form:
Full FormShort FormDescription
tinycloud.kv/getkv/getRead a key
tinycloud.kv/putkv/putWrite a key
tinycloud.kv/delkv/delDelete a key
tinycloud.kv/listkv/listList keys
tinycloud.space/hostspace/hostHost a space

Expiry Formats

FormatDescriptionExample
30mMinutes30 minutes
1hHours1 hour
7dDays7 days
1wWeeks1 week
ISO 8601Absolute date2026-12-31T23:59:59Z
$ tc delegation create \
    --to did:pkh:eip155:1:0x5678...efgh \
    --actions kv/get,kv/list \
    --path documents/ \
    --expiry 7d
{
  "cid": "bafy...",
  "delegateDid": "did:pkh:eip155:1:0x5678...efgh",
  "path": "documents/",
  "actions": ["tinycloud.kv/get", "tinycloud.kv/list"],
  "expiry": "2026-03-14T10:30:00.000Z"
}

tc delegation list

List all active delegations.
tc delegation list
$ tc delegation list
{
  "delegations": [
    {
      "cid": "bafy...",
      "delegatee": "did:pkh:eip155:1:0x5678...efgh",
      "delegator": "did:pkh:eip155:1:0xd8dA...",
      "path": "documents/",
      "actions": ["tinycloud.kv/get", "tinycloud.kv/list"],
      "expiry": "2026-03-14T10:30:00.000Z"
    }
  ],
  "count": 1
}

tc delegation info

Show details about a specific delegation.
tc delegation info <cid>
$ tc delegation info bafy...
{
  "cid": "bafy...",
  "delegateDID": "did:pkh:eip155:1:0x5678...efgh",
  "path": "documents/",
  "actions": ["tinycloud.kv/get", "tinycloud.kv/list"]
}

tc delegation revoke

Revoke an existing delegation.
tc delegation revoke <cid>
$ tc delegation revoke bafy...
{
  "cid": "bafy...",
  "revoked": true
}

DID Formats

The --to flag accepts DIDs in multiple formats:
FormatExampleDescription
PKH DIDdid:pkh:eip155:1:0xd8dA...Ethereum identity (recommended)
Key DIDdid:key:z6Mk...Cryptographic key identity
For user-to-user delegations, always use the recipient’s PKH DID (did:pkh:eip155:{chainId}:{address}). Using a session key DID will cause server validation to fail.
Share links are a simplified sharing mechanism. They generate a URL that recipients can use to receive a delegation, even without an existing TinyCloud identity.

tc share create

Create a shareable link for data in your space.
tc share create --path <path> --actions <actions> --expiry <duration>
$ tc share create \
    --path "documents/report.json" \
    --actions kv/get \
    --expiry 24h
{
  "token": "tc1:...",
  "shareData": "tc1:...",
  "path": "documents/report.json",
  "actions": ["tinycloud.kv/get"],
  "expiry": "2026-03-08T10:30:00.000Z"
}

tc share receive

Accept a share link and import the delegation.
tc share receive <share-url>
$ tc share receive https://node.tinycloud.xyz/share/abc123def456
{
  "received": true,
  "spaceId": "tinycloud:pkh:eip155:1:0xd8dA...6045:default",
  "path": "documents/report.json",
  "actions": ["tinycloud.kv/get"]
}

tc share list

List received share links.
tc share list

tc share revoke

Revoke a share link you created.
tc share revoke <token>
FeatureDelegationShare Link
Requires recipient DIDYesNo
Recipient needs TinyCloudYesNo (on receive)
RevocableYesYes
Sub-delegatableYesNo
DeliveryManual (you send the token)URL-based
Use delegations when you know the recipient’s DID and need fine-grained control. Use share links for quick, casual sharing where the recipient might not have TinyCloud set up yet.