pub.techne.draft.identity.resetLinkToken

Revoke the caller's live reusable links for `app` and `target` and make a new reusable one. Its grant is `grant` when given (checked as for createLinkToken), else a copy of the newest unrevoked grant the caller made for a reusable link with the same `app` and `target` (a one-time link's grant is never carried); with neither, the new link has no grant. One call spends one of the caller's writes.

Details · procedure
Kindprocedure
Authorityidentity.draft.techne.pub
Commit rev3n3iob5qqgw2u
Indexed
cid bafyreif22jcswa2ajpyjw45s2vcw3udb75r7pgapw5r4lminzko76l627e

Checks

Valid
  • unlimited-string defs.main.output.schema.properties.tokenNo maxLength, maxGraphemes or format limits this string.
JSONDownload
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Revoke the caller's live reusable links for `app` and `target` and make a new reusable one. Its grant is `grant` when given (checked as for createLinkToken), else a copy of the newest unrevoked grant the caller made for a reusable link with the same `app` and `target` (a one-time link's grant is never carried); with neither, the new link has no grant. One call spends one of the caller's writes.",
      "errors": [
        {
          "description": "HTTP 400: a field out of bounds, or a body that is not JSON; 413: the body, or `grant.write`, over its size cap; 415: not application/json; 422: not the input's shape.",
          "name": "InvalidRequest"
        },
        {
          "description": "HTTP 403: `grant.actAs` is not an account the caller may write as.",
          "name": "Forbidden"
        },
        {
          "description": "HTTP 400: the caller's account is not hosted on the platform's identity PDS, or link tokens are not configured there; or the caller holds its own session (it came through its PDS with a service-auth token): call this method on its identity PDS itself and attach a grant with attachLinkGrant.",
          "name": "NotSupported"
        },
        {
          "description": "Too many writes from this DID (HTTP 429).",
          "name": "RateLimitExceeded"
        },
        {
          "description": "HTTP 502: the identity PDS could not be reached, refused the credential the platform holds for the caller, or answered with a failure; try again.",
          "name": "UpstreamFailure"
        }
      ],
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "app": {
              "description": "The app the link is for, a label the caller gives itself (unverified).",
              "maxLength": 64,
              "minLength": 1,
              "type": "string"
            },
            "grant": {
              "ref": "pub.techne.draft.identity.defs#linkGrant",
              "type": "ref"
            },
            "target": {
              "description": "What the link is for, as a URI with a scheme (at://, https://, did:...).",
              "maxLength": 2048,
              "minLength": 1,
              "type": "string"
            }
          },
          "required": [
            "app",
            "target"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "link": {
              "ref": "pub.techne.draft.identity.defs#linkTokenView",
              "type": "ref"
            },
            "token": {
              "description": "The secret to put in the link. Whoever holds it can redeem it.",
              "type": "string"
            }
          },
          "required": [
            "link",
            "token"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "id": "pub.techne.draft.identity.resetLinkToken",
  "lexicon": 1
}