Application management and installations
The Apps service manages OAuth applications and the credentials and team connections that support them. It lets a project create, find, change, and remove applications while also managing app keys, client secrets, team ownership, installation access, installation tokens, and the scopes that define that access. For the wider service map, see Application and integration services; OAuth, analytics, and push covers the related OAuth flow.
Application lifecycle
An application is the project-level record for an OAuth client. It holds the client identity and consent information, controls whether the client is enabled, and defines the redirect and installation settings used by later authentication and installation flows.
The lifecycle supports these actions:
- Create an application with an ID, name, redirect URIs, and optional consent and client settings.
- List applications with query rules and an optional total count.
- Get one application by ID.
- Update its consent details, client behavior, redirect URIs, and installation settings.
- Delete the application.
An application can be a public client for clients that cannot keep a secret, or a confidential client for server-side clients. It can also allow the OAuth2 device flow. These choices affect how the application participates in authentication, while the installation settings affect how it requests access to teams.
References: src/…/apps.ts• L11-149 src/…/apps.ts• L152-540 src/…/apps.ts• L640-744 src/…/apps.ts• L747-1139 src/…/apps.ts• L1141-1193 docs/…/create.md• L1-33 docs/…/update.md• L1-34
Application ownership
An application has either a team owner or a user owner. The Apps service can transfer an application to another team, which changes the team context associated with the application without changing its application ID.
The transfer is a separate ownership action from a normal application update. Callers must provide both the application ID and the destination team ID.
References: src/…/apps.ts• L2289-2413 docs/…/update-team.md• L1-16
Application keys and secrets
Application keys and client secrets are separate credential types with different jobs. An app key identifies an application when the app manages its own installations, while a client secret authenticates a confidential OAuth client.
The service provides the same resource pattern for both types:
| Credential | Lifecycle | Main use |
|---|---|---|
| App key | Create, list, get, delete | Authorize application-level management of installations and installation tokens. |
| Client secret | Create, list, get, delete | Authenticate a confidential OAuth client. |
Client secret plaintext is returned only by the create operation. Later secret reads provide a hint instead of the full value. App key records also expose a key secret and a hint for identification, so callers must protect credential values and should not depend on a later read as a recovery path.
App keys carry no scopes. An app sends an app key with its application ID to list installations or create installation tokens, unless the caller already has update access to the application.
References: src/…/apps.ts• L1580-1926 src/…/apps.ts• L1928-2287 docs/…/create-key.md• L1-15 docs/…/create-secret.md• L1-15 docs/…/list-keys.md• L1-17 docs/…/list-secrets.md• L1-17
Installation scopes
Installation scopes describe the access an application may request when a user connects it to a team. The Apps service exposes the available installation scopes so a client can build a valid application configuration and understand what each scope grants.
OAuth2 scopes are a separate scope set for the sign-in and consent flow. Both scope lists return a value, description, type, category, and deprecation state. Only project and organization scopes are installable; account scopes belong to the OAuth2 flow rather than a team installation.
The application stores its requested installation scopes. An installation then stores a snapshot of the scopes granted when it is created or last updated. This separates the app's current request from the access already granted to a specific team.
References: src/…/apps.ts• L542-638 src/…/apps.ts• L747-794 docs/…/list-installation-scopes.md• L1-13
Installation lifecycle
An installation connects an application to a team and records the access granted to that team. The Apps service lets an app or an authorized app manager inspect these connections, issue access for one connection, and remove a connection.
The installation flow is centered on the application ID and installation ID.
flowchart LR
A[Application requests team access] --> B[Team installation]
B --> C[Installation scopes and authorization details]
C --> D[Installation access token]
B --> E[Application lists or reads installation]
B --> F[Application deletes installation]
F --> G[Installation access revoked]
The service supports these installation actions:
- List all installations for an application, with query rules and an optional total count.
- Get one installation by its ID.
- Create an installation token for that installation.
- Delete the installation.
An installation record identifies the app and team, stores the granted scope snapshot and authorization details, and records its creator. The related organization-level installation lifecycle is described in Organizations and installations.
Installation listing, reading, and token creation accept either an app key paired with the application ID or a caller with update access to the application. Installation deletion requires update access to the application.
References: src/…/apps.ts• L1195-1312 src/…/apps.ts• L1314-1409 src/…/apps.ts• L1411-1484 src/…/apps.ts• L1486-1578 docs/…/list-installations.md• L1-17 docs/…/get-installation.md• L1-15 docs/…/create-installation-token.md• L1-16 docs/…/delete-installation.md• L1-15
Installation tokens
An installation token is temporary bearer access issued for one application installation. It carries the scopes and authorization details granted to that installation, so downstream services can use it wherever OAuth2 access tokens are accepted.
An installation can have more than one active token. Each token remains valid until it expires or the installation is updated or deleted. Deleting an installation revokes tokens issued by that installation, so consumers must not treat an installation token as independent of its installation.
The Apps service also provides an application-wide token deletion action. This is the broad revocation control for all tokens belonging to an application.
References: src/…/apps.ts• L1486-1578 src/…/apps.ts• L2415-2470 docs/…/create-installation-token.md• L1-16 docs/…/delete-tokens.md• L1-15
Service boundary
The Apps service is the public SDK entry point for application and team-installation management. It uses the shared project client and returns typed application, credential, scope, installation, and token results through the package exports.
Application management is project-scoped. Team identity belongs to the application or installation record, while authorization comes from the authenticated caller and any app key used for app-level actions.
References: src/index.ts• L1-18 src/…/apps.ts• L1-14 src/…/apps.ts• L1195-1208 src/…/apps.ts• L1486-1497
Change checklist
When these files or sections are changed, remember to consider these:
- Keep application installation scope settings aligned with the scope catalog and the installation scope snapshot.
- Preserve the one-time plaintext rule for app keys and client secrets when changing credential response models.
- Keep app-key authorization requirements aligned with installation listing and installation-token creation.
- Treat installation deletion and token revocation as one contract.
- Keep team ownership transfer separate from updates to application consent and redirect settings.
- Keep list wrappers and their item models aligned for apps, keys, secrets, scopes, and installations.
Important failure modes
| Trigger | Consequence | Guard |
|---|---|---|
| A caller omits an application, key, secret, or installation ID | The SDK rejects the request before it is sent. | Supply the ID required by the resource action. |
| An application requests an invalid installation scope | The application update or installation flow cannot grant the requested access. | Use the installation-scope catalog and keep requested scopes within the allowed set. |
| A caller loses the newly created key or client secret | Later reads cannot recover the full credential value. | Store the value securely when the create call succeeds. |
| An installation is deleted | Tokens issued for that installation stop working. | Create a new installation and issue a new token when access is needed again. |
| An application-wide token revocation is used | All tokens for the application are revoked. | Use the broad revoke action only when every application token must stop working. |
| An application is transferred to another team | The application's owning team changes. | Check ownership and team access after the transfer. |
Key files
| File | Why to read it |
|---|---|
| src/…/apps.ts | Defines the application, credential, scope, installation, ownership, and token lifecycle. |
| src/models.ts | Defines the typed records and list results returned by the Apps service. |
| src/index.ts | Shows how the Apps service is exposed as part of the public SDK. |
| docs/…/create.md | Shows the inputs used to register an application. |
| docs/…/update.md | Shows the application settings that can change after creation. |
| docs/…/create-installation-token.md | Shows how an installation becomes usable access. |
| docs/…/list-installation-scopes.md | Shows how callers discover valid installation scopes. |