Introduction

Let’s get you started with some automated integration magic. 🔌🌐

In this example, you’ll use Anon to connect your LinkedIn account and send an automated LinkedIn message. All in less than 10 minutes!

To test out Anon, you must be in our private beta. Request access here and we’ll get back to you ASAP!

Quickstart setup

Once you have your credentials, you can run this Anon quickstart guide!

Clone the examples repo and fill out the environment variables

# Note: If on Windows, run
# git clone -c core.symlinks=true https://github.com/anon-dot-com/examples.git
# instead to ensure correct symlink behavior
git clone https://github.com/anon-dot-com/examples.git
cd ./examples

# Copy the .env.example file to .env
cp .env.example .env

Update the variables in the .env file

In .env, use the Anon-provided credentials to fill out the variables NPM_TOKEN, ANON_API_KEY, ANON_SDKCLIENT_ID, ANON_APP_USER_ID_TOKEN, and ANON_APP_USER_ID.

Run a frontend app to connect a user session

As a test, let’s run LinkedIn on the React example app.

# Use the React example
cd connect-react

# To get access to Anon's private repo,
# create a `.npmrc` file using your environment variable $NPM_TOKEN
source .env
sed "s/\${NPM_TOKEN}/${NPM_TOKEN}/g" .npmrc.template >.npmrc

# Install dependencies
yarn install --update-checksums

# Start the frontend app
yarn run start

Success! You are halfway done.

Next, you’ll connect a session in your frontend app, then run the session you just connected.

Connect your LinkedIn account in the frontend app

The above code runs a local Chromium-based browser that allows you to connect your LinkedIn account using Anon.

It may first prompt you to install the “Anon Link” Chrome extension. Next, click “Login to LinkedIn” to save your user session!

Run a backend app to run a Playwright script on a user session

Now, let’s create a LinkedIn post using the session you just connected.

# Use the Typescript LinkedIn example
cd ../run-typescript

# To get access to Anon's private repo,
# create a `.npmrc` file using your environment variable $NPM_TOKEN
source .env
sed "s/\${NPM_TOKEN}/${NPM_TOKEN}/g" .npmrc.template >.npmrc

# Install dependencies
yarn

# Start the backend app
yarn run dev

The above code runs a Playwright script which will retrieve your LinkedIn user session. Then, it will create a LinkedIn post using your account.

With each step, the script will output logs to your terminal and take a screenshot of the browser context thus far. After the script completes, you should see a set of screenshots and a test LinkedIn post created on your behalf!

Next Steps

You did it. You experienced the integration magic end-to-end! 🔌🌐

As a next step, you could try:

  • Running other pre-built example actions for LinkedIn, Instagram, Amazon, and many more on the examples repo.
  • Testing out our other SDKs for connecting sessions, like Vue, iOS, or React Native.
  • Writing your own Playwright scripts to arbitrarily turn any website into an API.

When you’re ready to start building for real, check out the Connecting User Sessions section.

Reach out to the Anon team any time by pinging Daniel or contacting our support email.

Ready to start integrating into your app?