TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: Is it possible to programatically interact with online chatbots?

3 pointsby mxmpawnover 4 years ago
Hi folks I was wondering if there's the possibility to write a bot that interacts with other bots/human agents from several online sites. I tried to come up with ways to do it but no ideas so far. What do you think?

2 comments

PaulHouleover 4 years ago
The straightforward way to implement chat is with messages sent over websockets or http.<p>If you open the &quot;Developer Tools&quot; in your web browser you can see a trace of network activity that will show you all that: probably they have a &#x27;web service&#x27; with a clear structure that you can imitate to send messages.<p>You might not quite be able to send those requests with curl, you may need a client that supports cookies or any of the foibles that real web browsers have instead of a simple http client. But it is very possible you can build an API in your favorite programming language to deal with the bots, keeping in mind the asynchronous nature of the thing -- your agent is potentially both a server and a client in multiple domains and very similar things might happen if you push the letter &#x27;k&#x27; or if they sent you a message.<p>The chat service cannot really encrypt or sign messages other than via HTTPS in the web browser: the client is in your physical possession and you can use the debugger and other tools to give up any secrets it contains or just re-write the Javascript to do exactly what you want.<p>If it were a hassle you might &quot;join &#x27;em rather than beat them&quot; by using a real web browser or simulation of a real web browser.<p>There are scripting APIs for Windows &amp; Mac, and APIs for handicapped accessibility, a headless Chrome browser that is built to be scripted.
znpyover 4 years ago
Of course, you only have to develop a chatbotbot.