space.highport.manage.grantSpaceAccess

Give bard a delegation token so it can keep reading a space. Any member can call this with a token they issued. Bard trades it for a credential, renews its notification registration when due, and catches up on anything it missed.

Details · procedure
Kindprocedure
Authoritymanage.highport.space
Indexed

Showing version bafyreidmfnhhehs2izyuaolralcuk4derqgqcgrkqz72qct3vahzipritq. Show the latest

cid bafyreidmfnhhehs2izyuaolralcuk4derqgqcgrkqz72qct3vahzipritq

Checks

Valid
  • unlimited-string defs.main.input.schema.properties.delegationTokenNo maxLength, maxGraphemes or format limits this string.
JSONDownload
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Give bard a delegation token so it can keep reading a space. Any member can call this with a token they issued. Bard trades it for a credential, renews its notification registration when due, and catches up on anything it missed.",
      "errors": [
        {
          "description": "Bard is not connected to that space. Call connectSpace first.",
          "name": "SpaceNotFound"
        },
        {
          "description": "The delegation token was not issued by the caller.",
          "name": "GrantIssuerMismatch"
        },
        {
          "description": "The delegation token has expired.",
          "name": "GrantExpired"
        },
        {
          "description": "The space host refused the exchange.",
          "name": "GrantRefused"
        },
        {
          "description": "The space does not allow bard access.",
          "name": "AppNotAllowed"
        },
        {
          "description": "Space support is disabled on this deployment.",
          "name": "SpacesDisabled"
        }
      ],
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "delegationToken": {
              "description": "A delegation token the caller minted for this space. Used once and never stored.",
              "type": "string"
            },
            "space": {
              "format": "at-uri",
              "type": "string"
            }
          },
          "required": [
            "space",
            "delegationToken"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "accessExpiresAt": {
              "description": "When bard's new credential expires.",
              "format": "datetime",
              "type": "string"
            },
            "drained": {
              "description": "Queued notifications this grant turned into sync jobs.",
              "type": "integer"
            },
            "registrationExpiresAt": {
              "description": "When bard's notification registration with the space host expires.",
              "format": "datetime",
              "type": "string"
            }
          },
          "required": [
            "accessExpiresAt",
            "drained"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "id": "space.highport.manage.grantSpaceAccess",
  "lexicon": 1
}