import Kernel from '@onkernel/sdk';
const client = new Kernel({
apiKey: process.env['KERNEL_API_KEY'], // This is the default and can be omitted
});
const submitFieldsResponse = await client.auth.connections.submit('id');
console.log(submitFieldsResponse.accepted);import os
from kernel import Kernel
client = Kernel(
api_key=os.environ.get("KERNEL_API_KEY"), # This is the default and can be omitted
)
submit_fields_response = client.auth.connections.submit(
id="id",
)
print(submit_fields_response.accepted)package main
import (
"context"
"fmt"
"github.com/kernel/kernel-go-sdk"
"github.com/kernel/kernel-go-sdk/option"
)
func main() {
client := kernel.NewClient(
option.WithAPIKey("My API Key"),
)
submitFieldsResponse, err := client.Auth.Connections.Submit(
context.TODO(),
"id",
kernel.AuthConnectionSubmitParams{
SubmitFieldsRequest: kernel.SubmitFieldsRequestParam{},
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", submitFieldsResponse.Accepted)
}curl --request POST \
--url https://api.onkernel.com/auth/connections/{id}/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"fields": {
"email": "user@example.com",
"password": "secret"
},
"sso_button_selector": "xpath=//button[contains(text(), 'Continue with Google')]",
"sso_provider": "google",
"mfa_option_id": "sms",
"sign_in_option_id": "work-account"
}
EOF<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.onkernel.com/auth/connections/{id}/submit",
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' => [
'email' => 'user@example.com',
'password' => 'secret'
],
'sso_button_selector' => 'xpath=//button[contains(text(), \'Continue with Google\')]',
'sso_provider' => 'google',
'mfa_option_id' => 'sms',
'sign_in_option_id' => 'work-account'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.post("https://api.onkernel.com/auth/connections/{id}/submit")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"fields\": {\n \"email\": \"user@example.com\",\n \"password\": \"secret\"\n },\n \"sso_button_selector\": \"xpath=//button[contains(text(), 'Continue with Google')]\",\n \"sso_provider\": \"google\",\n \"mfa_option_id\": \"sms\",\n \"sign_in_option_id\": \"work-account\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.onkernel.com/auth/connections/{id}/submit")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"fields\": {\n \"email\": \"user@example.com\",\n \"password\": \"secret\"\n },\n \"sso_button_selector\": \"xpath=//button[contains(text(), 'Continue with Google')]\",\n \"sso_provider\": \"google\",\n \"mfa_option_id\": \"sms\",\n \"sign_in_option_id\": \"work-account\"\n}"
response = http.request(request)
puts response.read_body{
"accepted": true
}{
"code": "bad_request",
"message": "Missing required field: app_name",
"details": [
{
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
],
"inner_error": {
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
}{
"code": "bad_request",
"message": "Missing required field: app_name",
"details": [
{
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
],
"inner_error": {
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
}{
"code": "bad_request",
"message": "Missing required field: app_name",
"details": [
{
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
],
"inner_error": {
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
}{
"code": "bad_request",
"message": "Missing required field: app_name",
"details": [
{
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
],
"inner_error": {
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
}{
"code": "bad_request",
"message": "Missing required field: app_name",
"details": [
{
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
],
"inner_error": {
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
}Submit field values
Submits field values for the login form. Poll the auth connection to track progress and get results.
import Kernel from '@onkernel/sdk';
const client = new Kernel({
apiKey: process.env['KERNEL_API_KEY'], // This is the default and can be omitted
});
const submitFieldsResponse = await client.auth.connections.submit('id');
console.log(submitFieldsResponse.accepted);import os
from kernel import Kernel
client = Kernel(
api_key=os.environ.get("KERNEL_API_KEY"), # This is the default and can be omitted
)
submit_fields_response = client.auth.connections.submit(
id="id",
)
print(submit_fields_response.accepted)package main
import (
"context"
"fmt"
"github.com/kernel/kernel-go-sdk"
"github.com/kernel/kernel-go-sdk/option"
)
func main() {
client := kernel.NewClient(
option.WithAPIKey("My API Key"),
)
submitFieldsResponse, err := client.Auth.Connections.Submit(
context.TODO(),
"id",
kernel.AuthConnectionSubmitParams{
SubmitFieldsRequest: kernel.SubmitFieldsRequestParam{},
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", submitFieldsResponse.Accepted)
}curl --request POST \
--url https://api.onkernel.com/auth/connections/{id}/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"fields": {
"email": "user@example.com",
"password": "secret"
},
"sso_button_selector": "xpath=//button[contains(text(), 'Continue with Google')]",
"sso_provider": "google",
"mfa_option_id": "sms",
"sign_in_option_id": "work-account"
}
EOF<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.onkernel.com/auth/connections/{id}/submit",
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' => [
'email' => 'user@example.com',
'password' => 'secret'
],
'sso_button_selector' => 'xpath=//button[contains(text(), \'Continue with Google\')]',
'sso_provider' => 'google',
'mfa_option_id' => 'sms',
'sign_in_option_id' => 'work-account'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.post("https://api.onkernel.com/auth/connections/{id}/submit")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"fields\": {\n \"email\": \"user@example.com\",\n \"password\": \"secret\"\n },\n \"sso_button_selector\": \"xpath=//button[contains(text(), 'Continue with Google')]\",\n \"sso_provider\": \"google\",\n \"mfa_option_id\": \"sms\",\n \"sign_in_option_id\": \"work-account\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.onkernel.com/auth/connections/{id}/submit")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"fields\": {\n \"email\": \"user@example.com\",\n \"password\": \"secret\"\n },\n \"sso_button_selector\": \"xpath=//button[contains(text(), 'Continue with Google')]\",\n \"sso_provider\": \"google\",\n \"mfa_option_id\": \"sms\",\n \"sign_in_option_id\": \"work-account\"\n}"
response = http.request(request)
puts response.read_body{
"accepted": true
}{
"code": "bad_request",
"message": "Missing required field: app_name",
"details": [
{
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
],
"inner_error": {
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
}{
"code": "bad_request",
"message": "Missing required field: app_name",
"details": [
{
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
],
"inner_error": {
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
}{
"code": "bad_request",
"message": "Missing required field: app_name",
"details": [
{
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
],
"inner_error": {
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
}{
"code": "bad_request",
"message": "Missing required field: app_name",
"details": [
{
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
],
"inner_error": {
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
}{
"code": "bad_request",
"message": "Missing required field: app_name",
"details": [
{
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
],
"inner_error": {
"code": "invalid_input",
"message": "Provided version string is not semver compliant"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Auth connection ID
Body
Request to submit field values, click an SSO button, select an MFA method, or select a sign-in option. Provide exactly one of fields, sso_button_selector, sso_provider, mfa_option_id, or sign_in_option_id.
Map of field name to value
Show child attributes
Show child attributes
{
"email": "user@example.com",
"password": "secret"
}XPath selector for the SSO button to click (ODA). Use sso_provider instead for CUA.
"xpath=//button[contains(text(), 'Continue with Google')]"
SSO provider to click, matching the provider field from pending_sso_buttons (e.g., "google", "github"). Cannot be used with sso_button_selector.
"google"
The MFA method type to select (when mfa_options were returned)
"sms"
The sign-in option ID to select (when sign_in_options were returned)
"work-account"
Response
Submission accepted for processing
Response from submitting field values
Whether the submission was accepted for processing