# site.mochott.account.getAuthorization

> A client writing long posts asks this before the first one. Without the authorization, mochott cannot delete an article whose long post was deleted in an app that deletes posts alone; the client should then open authorizeUrl so the account signs in to mochott once.

- Kind: query
- Authority: account.mochott.site
- Lexicon: 1
- Published by [tokimeki.blue](https://lexicon.garden/identity/did:plc:4tr5dqti7nmu6g2czpthntak), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:4tr5dqti7nmu6g2czpthntak/site.mochott.account.getAuthorization)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:4tr5dqti7nmu6g2czpthntak/site.mochott.account.getAuthorization/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:4tr5dqti7nmu6g2czpthntak/site.mochott.account.getAuthorization/analytics)

## Query (`site.mochott.account.getAuthorization`)

Type: query · GET

### Parameters (query string)

- `display` (string): How the client opens authorizeUrl. 'popup': in a popup window; the sign-in then ends on a mochott page that closes itself (the PDS's authorization page sends Cross-Origin-Opener-Policy, so window.opener is gone and nothing is posted back: check again when the client's window regains focus). Omitted or unknown: the sign-in ends on the mochott dashboard.
  - Constraints: knownValues: popup

### Output (application/json)

- `authorizeUrl` (string · uri, required): Where the account signs in to mochott. After signing in it lands on the mochott dashboard, or with display=popup on a page that closes itself.
- `authorized` (boolean, required): mochott holds a live authorization for the account.

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "A client writing long posts asks this before the first one. Without the authorization, mochott cannot delete an article whose long post was deleted in an app that deletes posts alone; the client should then open authorizeUrl so the account signs in to mochott once.",
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "authorizeUrl": {
              "description": "Where the account signs in to mochott. After signing in it lands on the mochott dashboard, or with display=popup on a page that closes itself.",
              "format": "uri",
              "type": "string"
            },
            "authorized": {
              "description": "mochott holds a live authorization for the account.",
              "type": "boolean"
            }
          },
          "required": [
            "authorized",
            "authorizeUrl"
          ],
          "type": "object"
        }
      },
      "parameters": {
        "properties": {
          "display": {
            "description": "How the client opens authorizeUrl. 'popup': in a popup window; the sign-in then ends on a mochott page that closes itself (the PDS's authorization page sends Cross-Origin-Opener-Policy, so window.opener is gone and nothing is posted back: check again when the client's window regains focus). Omitted or unknown: the sign-in ends on the mochott dashboard.",
            "knownValues": [
              "popup"
            ],
            "type": "string"
          }
        },
        "type": "params"
      },
      "type": "query"
    }
  },
  "description": "Whether mochott holds the requesting account's authorization (OAuth). Requires auth.",
  "id": "site.mochott.account.getAuthorization",
  "lexicon": 1,
  "revision": 2
}
```
