10+ Years  ·  1,000+ Uncommitted to Committed  ·  Baseball & Softball  ·  Since 2012

RC Prospects

Coach Portal Access Tokens

Generate signed access tokens for the Brevo email campaign. Each coach receives a unique, time-limited link that opens their portal directly.

Campaign Settings

72 hours = 3 days (recommended)

Batch Export — All Active Coaches

Generates a unique access token for every active coach with an email address. Downloads a CSV with columns: EXTERNAL_COACH_ID, FIRST_NAME, LAST_NAME, EMAIL, SCHOOL, DIVISION, TITLE, ACCESS_URL.

Brevo merge field: Use {{ contact.ACCESS_URL }} in your email template as the portal access button link. Import the CSV into Brevo as a contact list with ACCESS_URL as a custom attribute.

Test Single Coach Token

Generate a token for one coach by their External Coach ID (e.g. RCPTEST001, DI119650). Use this to test the access flow before sending the campaign.

How It Works

  1. Generate tokens → download CSV
  2. Import CSV into Brevo as a contact list with ACCESS_URL as a custom attribute
  3. In your Brevo email template, use {{ contact.ACCESS_URL }} as the portal button link
  4. Coach clicks the button → lands on /coach/access?t=TOKEN
  5. Server validates the token, finds/creates their account, sets session cookie
  6. Coach is redirected directly to /dashboard/coach — no login required
Tokens are HMAC-SHA256 signed with BETTER_AUTH_SECRET, unique per coach, and expire after the configured hours. A coach cannot access another coach's account. Email is never trusted from the URL — only from the signed token payload matched to the database.