Fill a credential
Changed onTypes a secret, a vault's entries, or fields read from 1Password into inputs on a page in the session. The values are decrypted on the session's host; neither the request nor the response contains them. Fill only types: it never submits, so click the submit button or press Enter afterwards. Nothing is typed unless the target frame is on an allowed origin of every secret being filled, or for onePassword on one of the request's allowedOrigins. A totp secret types the code current at fill time. A fill is safe to retry. Without pageId, Hyperbrowser considers the tabs whose URL starts with pageUrl (if given). If one is left, it's the target. If several are left, it prefers the tabs on an origin every secret (or onePassword.allowedOrigins) allows, unless frame is given, then the visible one among them; if more than one still qualifies, it returns 409 CREDENTIAL_PAGE_AMBIGUOUS listing the tabs. The chosen tab's origin is then checked, and a tab outside the allowed origins gets 403 CREDENTIAL_ORIGIN_NOT_ALLOWED with nothing typed. Requires an active Firecracker browser session created with these secrets, or the onePassword token, in credentials. Secrets are enabled for teams on request; please contact support to enable them (otherwise 403 SECRETS_FEATURE_DISABLED). Restricted API keys need both the browser.sessions.update and secrets.use scopes. A fill can take up to about 18 seconds, so set your client timeout to at least 30 seconds. Fills and refusals are recorded in the session's event logs as credential_filled and credential_fill_refused, with credential, vault, or for 1Password the token's name as onePasswordToken, and never values.
Request
- Base URLhttps://api.hyperbrowser.ai
- AuthAPI key in header x-api-key
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
Session ID.
Request body
Example request
{
"onePassword": {
"allowedOrigins": [
"https://www.scrapingcourse.com"
]
}
}Response
Success
Example response
{
"fields": [
{
"reference": "op://Dev Vault for Testing/scrapingcourse login/username"
}
]
}Changes
- breaking
the
/request property type changed fromstringto no type - info
added
subschema #1to the/request propertyoneOflist - info
removed the pattern
^[a-zA-Z0-9][a-zA-Z0-9_-]{0,127}$from the request property/
- breaking
- info
added the new optional request property
// - info
added the new optional request property
- info
added the non-success response with the status
- info
added the optional property
//to the response with the status
- info