Skip to main content
GET
/
auth
/
connections
/
{id}
/
timeline
JavaScript
import Kernel from '@onkernel/sdk';

const client = new Kernel({
  apiKey: process.env['KERNEL_API_KEY'], // This is the default and can be omitted
});

// Automatically fetches more pages as needed.
for await (const managedAuthTimelineEvent of client.auth.connections.timeline('id')) {
  console.log(managedAuthTimelineEvent.id);
}
import os
from kernel import Kernel

client = Kernel(
api_key=os.environ.get("KERNEL_API_KEY"), # This is the default and can be omitted
)
page = client.auth.connections.timeline(
id="id",
)
page = page.items[0]
print(page.id)
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"),
)
page, err := client.Auth.Connections.Timeline(
context.TODO(),
"id",
kernel.AuthConnectionTimelineParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
}
curl --request GET \
--url https://api.onkernel.com/auth/connections/{id}/timeline \
--header 'Authorization: Bearer <token>'
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.onkernel.com/auth/connections/{id}/timeline",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
HttpResponse<String> response = Unirest.get("https://api.onkernel.com/auth/connections/{id}/timeline")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.onkernel.com/auth/connections/{id}/timeline")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
[
  {
    "id": "<string>",
    "timestamp": "2023-11-07T05:31:56Z",
    "error_code": "<string>",
    "error_message": "<string>",
    "website_error": "<string>",
    "replay_id": "<string>",
    "updated_at": "2023-11-07T05:31:56Z"
  }
]
{
"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

Authorization
string
header
required

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

Path Parameters

id
string
required

Auth connection ID

Query Parameters

type
enum<string>

Filter the timeline to a single event type.

Available options:
login,
reauth,
health_check
limit
integer
default:20

Maximum number of events to return

Required range: x <= 100
offset
integer
default:0

Number of events to skip

Response

Event timeline for the auth connection

type
enum<string>
required

The kind of event. "login" and "reauth" are authentication attempts; "health_check" is a periodic session-validity check.

Available options:
login,
reauth,
health_check
id
string
required

Identifier of the underlying login/reauth session or health check.

timestamp
string<date-time>
required

When the event occurred.

status
enum<string>
required

Outcome of the event. For login/reauth events this is the flow status (IN_PROGRESS, SUCCESS, EXPIRED, CANCELED, FAILED). For health_check events it is the observed session state (AUTHENTICATED, NEEDS_AUTH).

Available options:
IN_PROGRESS,
SUCCESS,
EXPIRED,
CANCELED,
FAILED,
AUTHENTICATED,
NEEDS_AUTH
previous_status
enum<string>

The session state observed before this event. Present for health_check events that recorded a prior state.

Available options:
AUTHENTICATED,
NEEDS_AUTH
step
enum<string>

The step the flow reached. Present for login/reauth events.

Available options:
INITIALIZED,
DISCOVERING,
AWAITING_INPUT,
AWAITING_EXTERNAL_ACTION,
AWAITING_HUMAN_INTERVENTION,
SUBMITTING,
COMPLETED,
EXPIRED
error_code
string

Machine-readable error code. Present when a login/reauth event failed.

error_message
string

Human-readable error message. Present when a login/reauth event failed.

website_error
string

Visible error message from the website (e.g., 'Incorrect password'). Present when the website displayed an error during the attempt.

replay_id
string

Replay recording ID for the event's browser session, if session recording was enabled.

updated_at
string<date-time>

When the event was last updated. Present for login/reauth events.