For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
SupportPlayground
DocumentationAPI ReferenceRelease Notes
DocumentationAPI ReferenceRelease Notes
  • Get Started
    • Welcome
    • Quick Start
  • Learn About MultiOn
    • Browser Extension
    • Sessions
    • Retrieve
    • Skills
  • Build With MultiOn
    • Post on X
    • Scrape H&M
    • Order on Amazon
    • Cookbook
LogoLogo
SupportPlayground
On this page
  • Project setup
  • Follow MultiOn
  • Hello world!
Build With MultiOn

Post on X with MultiOn

Was this page helpful?
Previous

Scrape H&M with MultiOn

Next
Built with

This example combines MultiOn browse and local mode to post a loving message on X.

Project setup

TypeScript
Python
1

Install extension

Find the MultiOn Browser Extension on the Chrome Web Store and click “Add to Chrome” to add it to your browser. Make sure the API Enabled option is checked. Learn more about the browser extension here.

2

Initialize project

Create a new project by running the following command in your terminal:

$npm init
3

Install package

Install the multion package by running the following command in your terminal:

$npm install multion
4

Import library

Create a new file called index.ts and import the required library for the example:

1import { MultiOnClient } from 'multion';
5

Initialize client

Initialize the MultiOn client with your API key.

1const multion = new MultiOnClient({ apiKey: "YOUR_API_KEY" });
6

Run script

Run your script by running the following command in your terminal:

$node index.ts

Follow MultiOn

Use browse in local mode to follow us on X.

1const followResponse = await multion.browse({
2 cmd: "Follow @MultiOn_AI on X",
3 url: "https://x.com",
4 local: true
5});
6
7console.log(followResponse.message);

Hello world!

Continue the same session to say hi to the world.

1const sessionId = followResponse.sessionId
2
3const postResponse = await multion.browse({
4 sessionId: sessionId,
5 cmd: "Post 'Hello world, I love @MultiOn_AI!'"
6});
7
8console.log(postResponse.message);