# pub.techne.draft.identity.listLinkTokens

> The caller's live links for `app` and `target`, each with its token, in no promised order. A procedure so the token never rides a URL. One call spends one of the caller's writes.

- Kind: procedure
- Authority: identity.draft.techne.pub
- Lexicon: 1
- Published by [lexicons.techne.town](https://lexicon.garden/identity/did:plc:cbtfheqpi4g6vlrha4tpoh53), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:cbtfheqpi4g6vlrha4tpoh53/pub.techne.draft.identity.listLinkTokens)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:cbtfheqpi4g6vlrha4tpoh53/pub.techne.draft.identity.listLinkTokens/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:cbtfheqpi4g6vlrha4tpoh53/pub.techne.draft.identity.listLinkTokens/analytics)

## Procedure (`pub.techne.draft.identity.listLinkTokens`)

Type: procedure · POST

### Input (application/json)

- `app` (string, required): The app the link is for, a label the caller gives itself (unverified).
  - Constraints: minLength: 1, maxLength: 64
- `target` (string, required): What the link is for, as a URI with a scheme (at://, https://, did:...).
  - Constraints: minLength: 1, maxLength: 2048

### Output (application/json)

- `links` (array, required)
  - `items` (ref)
    - Reference: `pub.techne.draft.identity.defs#linkTokenListed`

### Errors

- `InvalidRequest`: HTTP 400: a field out of bounds, or a body that is not JSON; 415: not application/json; 422: not the input's shape.
- `NotSupported`: 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.
- `RateLimitExceeded`: Too many writes from this DID (HTTP 429).
- `UpstreamFailure`: 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.

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "The caller's live links for `app` and `target`, each with its token, in no promised order. A procedure so the token never rides a URL. 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; 415: not application/json; 422: not the input's shape.",
          "name": "InvalidRequest"
        },
        {
          "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.",
          "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"
            },
            "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": {
            "links": {
              "items": {
                "ref": "pub.techne.draft.identity.defs#linkTokenListed",
                "type": "ref"
              },
              "type": "array"
            }
          },
          "required": [
            "links"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "id": "pub.techne.draft.identity.listLinkTokens",
  "lexicon": 1
}
```
