API V4: inline secret bindings
Usesecret_bindings / secretBindings with the explicit V4 client. Give each
credential an alias and the hostnames where it may be typed. Refer to the alias
in the task, not the credential value.
This example fills a password field and stops before submitting. Replace the
example portal URL and provide PORTAL_PASSWORD through your application’s
secret store or environment. Do not commit the value or print the request body.
allowedDomainstakes bare hostnames, not URLs, ports, paths, or wildcards. A hostname also covers its subdomains. Use the narrowest host that works.- These domains restrict where that credential may be typed. They are not a browser-wide navigation or network allowlist.
- Bindings belong to one run. A follow-up that needs the same credential must pass the binding again, even when it reuses the same session.
- Use a separate alias for each credential field. Up to 20 bindings are allowed per run, with up to 20 allowed domains per binding.
- Aliases contain 1–64 lowercase letters, digits, hyphens, or underscores and start with a letter or digit.
- The inline limit is 4,096 bytes after JSON encoding for encryption, including its wrapper and escaping. It is not a 4,096-character allowance; non-ASCII characters, quotes, and backslashes consume extra space.
Checkout and payment frames
allowedDomains is checked against the focused field’s frame, not just
the shop page. For checkout automation, add the hostnames of payment or billing
providers whose embedded fields should receive the secret. A shop’s hostname
does not authorize unrelated third-party frames.
For example, if a shop embeds BigCommerce fields from
https://payments.bigcommerce.com, the relevant binding could use:
Legacy API V2
The examples below use the default V2 client and itssecrets /
allowed_domains fields. Do not pass those fields to v4.runs.create(); use
the secret bindings above. Keep this recipe only for an existing V2 integration.
Pass credentials to the agent scoped by domain.
allowed_domains to restrict the agent to specific domains. Supports wildcards: example.com, *.example.com.
For SSO/OAuth redirects, include all domains in the auth flow: