Skip to main content
POST
/
agents
/
auth
/
runs
/
{run_id}
/
submit
JavaScript
import Kernel from '@onkernel/sdk';

const client = new Kernel({
  apiKey: 'My API Key',
});

const agentAuthSubmitResponse = await client.agents.auth.runs.submit('run_id', {
  field_values: { email: '[email protected]', password: '********' },
});

console.log(agentAuthSubmitResponse.success);
{
  "success": true,
  "logged_in": true,
  "needs_additional_auth": true,
  "additional_fields": [
    {
      "name": "email",
      "type": "email",
      "label": "Email address",
      "placeholder": "[email protected]",
      "required": true,
      "selector": "input#email"
    }
  ],
  "error_message": "Incorrect email or password",
  "app_name": "Acme Corp",
  "target_domain": "doordash.com"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

run_id
string
required

Run ID

Body

application/json

Request to submit an auth form

field_values
object
required

Values for the discovered login fields

Example:
{
"email": "[email protected]",
"password": "********"
}

Response

Submission completed

Response from submit endpoint matching SubmitResult schema

success
boolean
required

Whether submission succeeded

logged_in
boolean

Whether user is now logged in

needs_additional_auth
boolean

Whether additional authentication fields are needed

additional_fields
object[]

Additional fields needed (e.g., OTP) - present when needs_additional_auth is true

error_message
string

Error message if submission failed

Example:

"Incorrect email or password"

app_name
string

App name (only present when logged_in is true)

Example:

"Acme Corp"

target_domain
string

Target domain (only present when logged_in is true)

Example:

"doordash.com"