> ## Documentation Index
> Fetch the complete documentation index at: https://browseruse-0aece648-mintlify-cli-docs-1773354647.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Social Media Platforms

> Use browser profiles and residential proxies to automate social media and job platforms reliably.

Social media and popular job platforms have strong anti-bot detection. To avoid blocks, you need to look like a real user — same browser fingerprint, same IP region, same cookies every time.

## Setup

1. **Create a blank profile** in the [Cloud Dashboard](https://cloud.browser-use.com/settings?tab=profiles)
2. **Start a test browser** with a residential proxy in your target country
3. **Manually log in** to the platform via the live view UI
4. **Save the profile** — it now contains your authenticated cookies

Always use the same profile + same proxy country when running tasks. If you used a US proxy during manual login, use `proxy_country_code="us"` for every task with that profile.

<Note>
  One profile per platform account is a good practice — it scopes agent access so a task on a job platform cannot accidentally touch your social account. However, it is not required.
</Note>

## Run a task with profile + proxy

<CodeGroup>
  ```python Python theme={null}
  from browser_use_sdk import AsyncBrowserUse

  client = AsyncBrowserUse()

  # Create session with profile + proxy
  session = await client.sessions.create(
      profile_id="your-social-profile-id",
      proxy_country_code="us",
  )

  # Run task — profile cookies handle auth, no credentials needed.
  # If cookies have expired, add op_vault_id="your-vault-id" for 1Password auto-login.
  result = await client.run(
      "Post 'Hello from Browser Use!'",
      session_id=session.id,
      allowed_domains=["*.y.com", "y.com"],
  )
  print(result.output)

  await client.sessions.stop(session.id)
  ```

  ```typescript TypeScript theme={null}
  import { BrowserUse } from "browser-use-sdk";

  const client = new BrowserUse();

  // Create session with profile + proxy
  const session = await client.sessions.create({
    profileId: "your-social-profile-id",
    proxyCountryCode: "us",
  });

  // Run task — profile cookies handle auth, no credentials needed.
  // If cookies have expired, add opVaultId: "your-vault-id" for 1Password auto-login.
  const result = await client.run(
    "Post 'Hello from Browser Use!'",
    {
      sessionId: session.id,
      allowedDomains: ["*.y.com", "y.com"],
    },
  );
  console.log(result.output);

  await client.sessions.stop(session.id);
  ```
</CodeGroup>

## First-time login with 1Password

If you have not logged in manually yet, use 1Password to handle the initial login. The credentials and 2FA codes are auto-filled from your vault. After this task completes, the login is saved in the profile — future tasks only need the profile.

<CodeGroup>
  ```python Python theme={null}
  from browser_use_sdk import AsyncBrowserUse

  client = AsyncBrowserUse()

  session = await client.sessions.create(
      profile_id="your-social-profile-id",
      proxy_country_code="us",
  )

  result = await client.run(
      "Log in and post 'Hello from Browser Use!'",
      session_id=session.id,
      op_vault_id="your-vault-id",
      allowed_domains=["*.y.com", "y.com"],
  )
  print(result.output)

  await client.sessions.stop(session.id)

  # The login is now saved in the profile.
  # Future tasks only need profile + proxy — no 1Password needed.
  # Always use the same proxy country you used here.
  ```

  ```typescript TypeScript theme={null}
  import { BrowserUse } from "browser-use-sdk";

  const client = new BrowserUse();

  const session = await client.sessions.create({
    profileId: "your-social-profile-id",
    proxyCountryCode: "us",
  });

  const result = await client.run(
    "Log in and post 'Hello from Browser Use!'",
    {
      sessionId: session.id,
      opVaultId: "your-vault-id",
      allowedDomains: ["*.y.com", "y.com"],
    },
  );
  console.log(result.output);

  await client.sessions.stop(session.id);

  // The login is now saved in the profile.
  // Future tasks only need profile + proxy — no 1Password needed.
  // Always use the same proxy country you used here.
  ```
</CodeGroup>

<Tip>
  Refresh profiles older than 7 days to keep login state fresh. Cookies expire.
</Tip>
