curl --request POST \
--url https://api.hyperbrowser.ai/api/session/{id}/credentials/fill \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"fields": [
{
"selector": "<string>",
"field": "<string>"
}
],
"credential": "<string>",
"vault": "<string>",
"pageId": "<string>",
"pageUrl": "<string>"
}
'import requests
url = "https://api.hyperbrowser.ai/api/session/{id}/credentials/fill"
payload = {
"fields": [
{
"selector": "<string>",
"field": "<string>"
}
],
"credential": "<string>",
"vault": "<string>",
"pageId": "<string>",
"pageUrl": "<string>"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
fields: [{selector: '<string>', field: '<string>'}],
credential: '<string>',
vault: '<string>',
pageId: '<string>',
pageUrl: '<string>'
})
};
fetch('https://api.hyperbrowser.ai/api/session/{id}/credentials/fill', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.hyperbrowser.ai/api/session/{id}/credentials/fill",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'fields' => [
[
'selector' => '<string>',
'field' => '<string>'
]
],
'credential' => '<string>',
'vault' => '<string>',
'pageId' => '<string>',
'pageUrl' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.hyperbrowser.ai/api/session/{id}/credentials/fill"
payload := strings.NewReader("{\n \"fields\": [\n {\n \"selector\": \"<string>\",\n \"field\": \"<string>\"\n }\n ],\n \"credential\": \"<string>\",\n \"vault\": \"<string>\",\n \"pageId\": \"<string>\",\n \"pageUrl\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.hyperbrowser.ai/api/session/{id}/credentials/fill")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"fields\": [\n {\n \"selector\": \"<string>\",\n \"field\": \"<string>\"\n }\n ],\n \"credential\": \"<string>\",\n \"vault\": \"<string>\",\n \"pageId\": \"<string>\",\n \"pageUrl\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hyperbrowser.ai/api/session/{id}/credentials/fill")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"fields\": [\n {\n \"selector\": \"<string>\",\n \"field\": \"<string>\"\n }\n ],\n \"credential\": \"<string>\",\n \"vault\": \"<string>\",\n \"pageId\": \"<string>\",\n \"pageUrl\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"pageId": "<string>",
"origin": "<string>",
"fields": [
{
"selector": "<string>",
"outcome": "filled",
"secretId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version": 123,
"field": "<string>",
"expiresAt": "2023-11-07T05:31:56Z"
}
],
"version": 123
}{
"code": "<string>",
"message": "<string>",
"error": "<string>",
"requiredScopes": [
"<string>"
],
"retryable": true,
"details": {}
}{
"code": "<string>",
"message": "<string>",
"error": "<string>",
"requiredScopes": [
"<string>"
],
"retryable": true,
"details": {}
}{
"code": "<string>",
"message": "<string>",
"error": "<string>",
"requiredScopes": [
"<string>"
],
"retryable": true,
"details": {}
}{
"code": "<string>",
"message": "<string>",
"error": "<string>",
"requiredScopes": [
"<string>"
],
"retryable": true,
"details": {}
}{
"code": "<string>",
"message": "<string>",
"error": "<string>",
"requiredScopes": [
"<string>"
],
"retryable": true,
"details": {}
}{
"code": "<string>",
"message": "<string>",
"error": "<string>",
"requiredScopes": [
"<string>"
],
"retryable": true,
"details": {}
}{
"code": "<string>",
"message": "<string>",
"error": "<string>",
"requiredScopes": [
"<string>"
],
"retryable": true,
"details": {}
}{
"code": "<string>",
"message": "<string>",
"error": "<string>",
"requiredScopes": [
"<string>"
],
"retryable": true,
"details": {}
}{
"code": "<string>",
"message": "<string>",
"error": "<string>",
"requiredScopes": [
"<string>"
],
"retryable": true,
"details": {}
}{
"code": "<string>",
"message": "<string>",
"error": "<string>",
"requiredScopes": [
"<string>"
],
"retryable": true,
"details": {}
}{
"code": "<string>",
"message": "<string>",
"error": "<string>",
"requiredScopes": [
"<string>"
],
"retryable": true,
"details": {}
}Fill a credential
Type a secret’s or a vault’s values into a page in the session, without returning them.
curl --request POST \
--url https://api.hyperbrowser.ai/api/session/{id}/credentials/fill \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"fields": [
{
"selector": "<string>",
"field": "<string>"
}
],
"credential": "<string>",
"vault": "<string>",
"pageId": "<string>",
"pageUrl": "<string>"
}
'import requests
url = "https://api.hyperbrowser.ai/api/session/{id}/credentials/fill"
payload = {
"fields": [
{
"selector": "<string>",
"field": "<string>"
}
],
"credential": "<string>",
"vault": "<string>",
"pageId": "<string>",
"pageUrl": "<string>"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
fields: [{selector: '<string>', field: '<string>'}],
credential: '<string>',
vault: '<string>',
pageId: '<string>',
pageUrl: '<string>'
})
};
fetch('https://api.hyperbrowser.ai/api/session/{id}/credentials/fill', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.hyperbrowser.ai/api/session/{id}/credentials/fill",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'fields' => [
[
'selector' => '<string>',
'field' => '<string>'
]
],
'credential' => '<string>',
'vault' => '<string>',
'pageId' => '<string>',
'pageUrl' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.hyperbrowser.ai/api/session/{id}/credentials/fill"
payload := strings.NewReader("{\n \"fields\": [\n {\n \"selector\": \"<string>\",\n \"field\": \"<string>\"\n }\n ],\n \"credential\": \"<string>\",\n \"vault\": \"<string>\",\n \"pageId\": \"<string>\",\n \"pageUrl\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.hyperbrowser.ai/api/session/{id}/credentials/fill")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"fields\": [\n {\n \"selector\": \"<string>\",\n \"field\": \"<string>\"\n }\n ],\n \"credential\": \"<string>\",\n \"vault\": \"<string>\",\n \"pageId\": \"<string>\",\n \"pageUrl\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hyperbrowser.ai/api/session/{id}/credentials/fill")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"fields\": [\n {\n \"selector\": \"<string>\",\n \"field\": \"<string>\"\n }\n ],\n \"credential\": \"<string>\",\n \"vault\": \"<string>\",\n \"pageId\": \"<string>\",\n \"pageUrl\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"pageId": "<string>",
"origin": "<string>",
"fields": [
{
"selector": "<string>",
"outcome": "filled",
"secretId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version": 123,
"field": "<string>",
"expiresAt": "2023-11-07T05:31:56Z"
}
],
"version": 123
}{
"code": "<string>",
"message": "<string>",
"error": "<string>",
"requiredScopes": [
"<string>"
],
"retryable": true,
"details": {}
}{
"code": "<string>",
"message": "<string>",
"error": "<string>",
"requiredScopes": [
"<string>"
],
"retryable": true,
"details": {}
}{
"code": "<string>",
"message": "<string>",
"error": "<string>",
"requiredScopes": [
"<string>"
],
"retryable": true,
"details": {}
}{
"code": "<string>",
"message": "<string>",
"error": "<string>",
"requiredScopes": [
"<string>"
],
"retryable": true,
"details": {}
}{
"code": "<string>",
"message": "<string>",
"error": "<string>",
"requiredScopes": [
"<string>"
],
"retryable": true,
"details": {}
}{
"code": "<string>",
"message": "<string>",
"error": "<string>",
"requiredScopes": [
"<string>"
],
"retryable": true,
"details": {}
}{
"code": "<string>",
"message": "<string>",
"error": "<string>",
"requiredScopes": [
"<string>"
],
"retryable": true,
"details": {}
}{
"code": "<string>",
"message": "<string>",
"error": "<string>",
"requiredScopes": [
"<string>"
],
"retryable": true,
"details": {}
}{
"code": "<string>",
"message": "<string>",
"error": "<string>",
"requiredScopes": [
"<string>"
],
"retryable": true,
"details": {}
}{
"code": "<string>",
"message": "<string>",
"error": "<string>",
"requiredScopes": [
"<string>"
],
"retryable": true,
"details": {}
}{
"code": "<string>",
"message": "<string>",
"error": "<string>",
"requiredScopes": [
"<string>"
],
"retryable": true,
"details": {}
}Authorizations
Path Parameters
Session ID.
Body
Provide exactly one of credential and vault.
The inputs to type into. Each selector may appear once.
1 - 16 elementsShow child attributes
Show child attributes
A secret's name or ID (names are matched first). It must have been attached to the session when the session was created, directly or through a vault. Each field then has only a selector.
1 - 255A stored vault's name. Each field's field names the entry whose secret is typed; the entry's secret must have been attached when the session was created.
^[a-zA-Z0-9][a-zA-Z0-9_-]{0,127}$CDP target ID of the tab to fill, at most 128 UTF-8 bytes. Pass it, or pageUrl, when more than one tab could be the target. Not with pageUrl.
1Fill the tab whose URL starts with this prefix, at most 2048 UTF-8 bytes, instead of naming its pageId. Not with pageId.
1Target an iframe, such as an embedded login form. Without it, the tab's main frame is filled.
Show child attributes
Show child attributes
Response
Success
What was typed where. Never contains values.
Was this page helpful?