pub.techne.draft.identity.finishAddMethod
Finish adding a sign-in method with the code identity.beginAddMethod sent. `added`: the method is now bound to the caller's account. `alreadyYours`: it already was (re-issued). `boundElsewhere`: it signs in to another account. When one of the two accounts is empty and new, `offer` (`fold`) says it can be folded into the other with identity.fold; when both hold something, `other` names that account and no offer is made: the two are linked by moving the method (identity.manageMethods moveMethod, on the identity PDS's account page). The `link` offer is retired. The offer's token is single-use, bound to both accounts, the channel and this session, and lasts 10 minutes. `unavailable`: the method cannot be added right now.
Details · procedure
| Kind | procedure |
|---|---|
| Authority | identity.draft.techne.pub |
| Commit rev | 3n3iob5brwg2u |
| Indexed |
Checks
Validunlimited-stringdefs.main.output.schema.properties.statusNo maxLength, maxGraphemes or format limits this string.unlimited-stringdefs.offer.properties.actionNo maxLength, maxGraphemes or format limits this string.
{
"$type": "com.atproto.lexicon.schema",
"defs": {
"main": {
"description": "Finish adding a sign-in method with the code identity.beginAddMethod sent. `added`: the method is now bound to the caller's account. `alreadyYours`: it already was (re-issued). `boundElsewhere`: it signs in to another account. When one of the two accounts is empty and new, `offer` (`fold`) says it can be folded into the other with identity.fold; when both hold something, `other` names that account and no offer is made: the two are linked by moving the method (identity.manageMethods moveMethod, on the identity PDS's account page). The `link` offer is retired. The offer's token is single-use, bound to both accounts, the channel and this session, and lasts 10 minutes. `unavailable`: the method cannot be added right now.",
"errors": [
{
"description": "No signed-in caller.",
"name": "AuthenticationRequired"
},
{
"description": "The code is wrong, expired or used up, or the challenge is not the caller's.",
"name": "InvalidCode"
},
{
"description": "A phone code: the provider that sent it is refusing more checks for this number for now (HTTP 429). Wait a few minutes.",
"name": "RateLimitExceeded"
},
{
"description": "The channel was frozen on its account since the code was sent, or it would be new to the caller's account while one of its methods is frozen (HTTP 403).",
"name": "MethodFrozen"
},
{
"description": "The channel signs in to another account, and one of the two has a recovery mark, a live freeze, a pending change, or a passkey, Nostr key or recovery codes (HTTP 409): no fold or link is offered, and the other account is not named (no `boundElsewhere`).",
"name": "ProtectedAccount"
},
{
"description": "A phone code: the provider that sent it could not be asked whether it matches (HTTP 502). The code is not spent; try again.",
"name": "UpstreamFailure"
}
],
"input": {
"encoding": "application/json",
"schema": {
"properties": {
"challenge": {
"maxLength": 128,
"type": "string"
},
"code": {
"maxLength": 16,
"type": "string"
}
},
"required": [
"challenge",
"code"
],
"type": "object"
}
},
"output": {
"encoding": "application/json",
"schema": {
"properties": {
"method": {
"description": "`added` / `alreadyYours`: the method. Absent on `boundElsewhere`: the other account's method is named only to the identity PDS (identity.manageMethods addChannel).",
"ref": "pub.techne.draft.identity.defs#methodView",
"type": "ref"
},
"offer": {
"ref": "#offer",
"type": "ref"
},
"other": {
"description": "`boundElsewhere` when both accounts hold something: the account the method signs in to (no `offer`).",
"format": "did",
"type": "string"
},
"status": {
"knownValues": [
"added",
"alreadyYours",
"boundElsewhere",
"unavailable"
],
"type": "string"
}
},
"required": [
"status"
],
"type": "object"
}
},
"type": "procedure"
},
"offer": {
"properties": {
"action": {
"description": "`fold`. (`link` is retired and no longer offered.)",
"knownValues": [
"fold",
"link"
],
"type": "string"
},
"expiresAt": {
"format": "datetime",
"type": "string"
},
"keep": {
"description": "With `fold`: the account that is kept (the other one is emptied into it and deleted).",
"format": "did",
"type": "string"
},
"other": {
"description": "The account the method is bound to.",
"format": "did",
"type": "string"
},
"token": {
"maxLength": 128,
"type": "string"
}
},
"required": [
"action",
"token",
"other",
"expiresAt"
],
"type": "object"
}
},
"id": "pub.techne.draft.identity.finishAddMethod",
"lexicon": 1
}