Request External Resource
request_external_resourceRequest the user's own credential for an outside service on this project: their OpenAI or Anthropic key, an external Postgres database (type POSTGRES), or any other service's key (type GENERIC, with secret_env_vars). Floot-managed resources (database, auth, push, …) need no user input: use provision_resource. Request it early and keep building; code can reference process.env. before the user connects. Never ask the user to paste a secret into the chat.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Display name for GENERIC requests, e.g. 'Stripe'. | |
| type | Yes | ||
| projectId | Yes | ||
| instructions | No | Why the key is needed / where the user can find it — shown to the user in the dialog. | |
| reuse_existing | No | Default true: a matching credential the owner already saved (same name or env var) is attached without asking the user. Pass false when this project needs its OWN, separate credential (a test or copied project, a secret that must differ from their other projects): the user gets a dialog to create a new one, under a name no saved credential uses. | |
| secret_env_vars | No | Required for GENERIC: the env var name(s) your code reads, e.g. ["STRIPE_SECRET_KEY"]. Each is a required field in the user's dialog. | |
| optional_env_vars | No | GENERIC only: env vars the user can leave blank and fill in later, e.g. a webhook signing secret. |