Custom Automations

You can use playwright or puppeteer to take actions on your users behalf

If you want to write your own automations using playwright to act on your users behalf you can do that by connecting to the playwright instance over CDP.

Venmo is used here as an example but every integration offers the endpoint POST: /session to get a websocket url to connect via playwright or puppeteer.

Get a websocket url to connect to playwright

POST
/v1/venmo/session
curl -X POST https://api.trykeet.com/v1/venmo/session \
-H "X-Account-Token: X-Account-Token" \
-H "Authorization: Bearer <token>"
Response
{
"status": "ok",
"wsUrl": "wsUrl",
"postSignInUrl": "postSignInUrl",
"debuggerFullscreenUrl": "debuggerFullscreenUrl"
}

You can then use this wsUrl to connect to the playwright instance over CDP.

Connect to a playwright instance

const browser = await chromium.connectOverCDP(wsUrl)
const context = browser.contexts()[0]
const page = await context.newPage()
await page.goto("https://accounts.venmo.com")
// Your other automations here...
await browser.close()