• mrbeast.salesforce.com
  • alias mrbeast
  • API v60.0

MrBeast Salesforce setup

Walk password auth or a JWT connected app, then prove it with a query. Checks stay in this browser. Secrets stay in .env.

Password auth

Fastest path for a person at a laptop. The security token rotates, so this is a poor fit for CI.

01 · Password

Install the CLI and the Python skills

You need Node.js 18+ and Python 3.10+, plus an admin or API-enabled user on the org.

cwd repository root

npm install -g @salesforce/cli
cd agents/operations
pip install -e ".[salesforce]"

02 · Password

Reset your security token

Password auth appends this token to the password. JWT auth does not use it.

  1. Log in to mrbeast.salesforce.com.
  2. Click your avatar, then Settings.
  3. Open My Personal Information → Reset My Security Token.
  4. Click Reset Security Token and read the token from email.

03 · Password

Fill the password secrets

This page never asks for these values. Keep them in .env, which is gitignored.

cwd agents/operations

cp .env.example .env
SF_INSTANCE_URL=https://mrbeast.salesforce.com
SF_USERNAME=your.email@mrbeast.com
SF_PASSWORD=your_password_here
SF_SECURITY_TOKEN=token_from_email

04 · Password

Log in and confirm who you are

cwd agents/operations

python salesforce/skills/salesforce_auth.py status
python salesforce/skills/salesforce_auth.py login
python salesforce/skills/salesforce_auth.py whoami

05 · Password

Alias the org as mrbeast

The script opens a browser and sets the default target org. Already authenticated? Log out of the alias, then run it again.

cwd agents/operations

cd salesforce/sfdx
bash scripts/setup.sh

Connected app (JWT)

No password in the environment. A certificate signs the assertion. Use this for automation.

06 · JWT

Generate a one-year certificate

Write the key outside the repo. Add server.key to .gitignore. Store a copy in 1Password or AWS Secrets Manager, and rotate the certificate before it expires.

cwd a directory you do not commit

openssl genrsa -out server.key 2048
openssl req -new -x509 -key server.key -out server.crt -days 365 \
  -subj "/CN=MrBeast Salesforce API/O=MrBeast/C=US"

07 · JWT

Create the connected app

  1. In the org, open Setup → App Manager → New Connected App.
  2. Name: MrBeast API Automation. API name: MrBeast_API_Automation. Contact email: your admin email.
  3. Enable OAuth Settings. Callback URL: https://login.salesforce.com/services/oauth2/callback.
  4. Use digital signatures and upload server.crt.
  5. Scopes: api, refresh_token, offline_access.
  6. Save, then Continue.

08 · JWT

Pre-authorize the users

  1. Open the connected app, then Manage → Edit Policies.
  2. Set Permitted Users to Admin approved users are pre-authorized.
  3. Save.
  4. Add the profiles or permission sets that need API access.

09 · JWT

Copy the consumer key

Setup → App Manager → the app’s dropdown → View → Consumer Key. The JWT skill signs with the private key, so it does not read SF_CONSUMER_SECRET.

10 · JWT

Point secrets at the key

cwd agents/operations

SF_CONSUMER_KEY=consumer_key_from_the_app
SF_PRIVATE_KEY_PATH=/path/to/server.key
SF_USERNAME=your.email@mrbeast.com

11 · JWT

Verify JWT auth

cwd agents/operations

python salesforce/skills/salesforce_auth.py login --method jwt
python salesforce/skills/salesforce_auth.py whoami --method jwt

Prove the connection

Reads only. The object skills can create and delete records; this checklist stops before that.

12 · Prove

Run a read-only query

cwd agents/operations, alias already set

python salesforce/skills/salesforce_query.py "SELECT Id, Name FROM Account LIMIT 5"
sf data query -q "SELECT Id, Name FROM Account LIMIT 5" -o mrbeast

13 · Prove

Describe Account

cwd agents/operations

python salesforce/skills/salesforce_query.py describe Account
python salesforce/skills/salesforce_query.py list-objects --custom-only

14 · Prove

Open the org and read metadata

Retrieve pulls metadata into agents/operations/salesforce/sfdx. Deploy writes to the org. Preview before a push with sf project deploy preview -o mrbeast.

sf org open -o mrbeast
sf org display -o mrbeast
sf project retrieve start -o mrbeast

Crib

From the operations reference. Queries are read-only examples.

Paste an error

    SOQL

    cwd agents/operations

    python salesforce/skills/salesforce_query.py "SELECT Id, Name, Email FROM Contact LIMIT 10" --format table
    python salesforce/skills/salesforce_query.py "SELECT Id, Name, (SELECT Id, Name, Email FROM Contacts) FROM Account LIMIT 10"
    python salesforce/skills/salesforce_query.py "SELECT Id, Name, Amount, StageName, CloseDate FROM Opportunity WHERE CloseDate >= THIS_MONTH ORDER BY Amount DESC"
    python salesforce/skills/salesforce_query.py "SELECT StageName, COUNT(Id), SUM(Amount) FROM Opportunity GROUP BY StageName"

    REST, API v60.0

    Base https://mrbeast.salesforce.com/services/data/v60.0. Authorization: Bearer token from the auth skill.

    CallWhat it does
    GET /query?q={SOQL}Run SOQL
    GET /sobjectsList objects
    GET /sobjects/Account/describeDescribe Account
    GET /limitsAPI usage remaining

    Id prefixes in this crib

    PrefixObject

    Daily API calls

    EditionCalls / 24h
    Enterprise100,000
    Unlimited500,000
    Developer15,000

    Also visible in Setup → Company Information → API Requests, Last 24 Hours.