pub.techne.draft.identity.redeemLinkToken
Redeem a link token as the caller. The identity PDS records it and reports it to the platform, which writes the caller's linkRedemption record and the link's grant, usually before this answers. Redeeming again a link the caller already redeemed answers `repeat` and changes nothing. One call spends one of the caller's writes. An older link (one the served app made before link tokens) writes no linkRedemption record. A caller that holds its own session redeems at its identity PDS and then calls claimLinkGrant; here it opens only the app's links from before link tokens. A link whose grant was attached with attachLinkGrant has it released in this request.
Details · procedure
| Kind | procedure |
|---|---|
| Authority | identity.draft.techne.pub |
| Commit rev | 3n3iob5owt62u |
| Indexed |
Procedure
procedure · POSTInput
application/jsonmaxLength: 512
Output
application/jsonErrors
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.
LinkNotUsable
HTTP 400: the link is unknown, revoked, expired or already used by another account ("this link no longer works"); or, for a caller that holds its own session, any token but one of the app's links from before link tokens.
OwnLink
HTTP 400: the caller made this link.
NotSupported
HTTP 400: link tokens are not available to this caller (its account is not hosted on the platform's identity PDS, or the platform has no identity PDS configured), and the token names none of the served app's older links that still open for it.
RateLimitExceeded
HTTP 429: too many writes, or too many short codes that named no link, from this DID.
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.
Similar lexicons
semantic matchLexicons whose schemas describe something close to this one. Check them before publishing a new one that overlaps.
-
pub.techne.draft.identity.claimLinkGrant
procedureRelease, now, the grant of a link the caller redeemed on their own identity PDS (an app holding its own session calls redeemLinkToken there, then this through its PDS, in the same user action). The platform needs the redemption the identity PDS reported for the caller; it writes the grant's record as the grant's `actAs` in this request, under the grant's rules (the link's owner may still write as `actAs`, no block between owner and redeemer). The platform never releases such a grant in the backg
-
Make a link token on the caller's identity PDS: a secret anyone can redeem (redeemLinkToken) once (one-time, the default) or any number of times by different accounts (`reusable`). With `grant`, the platform keeps a write it makes for each account that redeems it: when the identity PDS reports a redemption, the platform writes the redeemer's own pub.techne.draft.identity.linkRedemption record in their personal space and then writes `grant.write` as `grant.actAs` with the redeemer's DID in every
-
pub.techne.draft.identity.resetLinkToken
procedureRevoke 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.
-
Who redeemed one of the caller's links, and when. Empty for a link that is not the caller's. One call spends one of the caller's writes.
-
Revoke one of the caller's links: it no longer redeems. A redemption the identity PDS took before the revoke still gets its grant. One call spends one of the caller's writes.