x_auth_upsert_app_credentials
Store or rotate tenant-scoped X app credentials for bearer token or OAuth1 consumer authentication. Updates Vault secrets and Postgres metadata for the tenant's app profile.
Instructions
Store or rotate tenant-scoped X app credentials. Use when: you need a bearer token for app-auth endpoints or OAuth1 consumer credentials for OAuth1 user signing. Do not use when: you are storing user/account-specific access tokens; use x_auth_upsert_principal_credentials instead. Risk: mutating, high-risk. Required permissions and prerequisites: tenantId is required; provide bearerToken and/or the OAuth1 consumer key pair. Environment-selection behavior: writes Vault secrets under the tenant app-profile path and metadata under tenant-scoped Postgres config. Expected response shape: { ok, status, data: { profileKey, authTypesAvailable, secretPath, updatedAt } } Common failure conditions: missing tenantId, empty secret values, Vault write failures, or Postgres write failures. Safety warnings: rotating these credentials can affect every principal in the tenant that relies on the default app profile. Example: {"tenantId":"acme","profileKey":"default","bearerToken":"...","makeDefault":true,"authorizationKey":""}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| label | No | ||
| notes | No | ||
| tenantId | Yes | ||
| profileKey | No | ||
| bearerToken | No | ||
| makeDefault | No | ||
| authorizationKey | No | ||
| oauth1ConsumerKey | No | ||
| oauth1ConsumerSecret | No |