FeaturesTemplatesShowcaseTownie
AI
BlogDocsPricing
Log inSign up
xxxjjj
xxxjjjmain
Remix of xxxjjj/sbc_register_fixed_partner_ladder_event
Public
Like
main
Home
Code
2
README.md
H
main.tsx
Branches
1
Pull requests
Remixes
History
Environment variables
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Sign up now
Code
/
Code
/
Search
main.tsx
https://xxxjjj--240b620c277611f0b46e569c3dd06744.web.val.run
README.md

SBC(Seattle Badminton Club) Ladder Registration Guide

This guide explains how to set up automated registration for SBC Ladder badminton events using Val.Town.

https://sbc-ladder.kgignatyev.com/

Obtaining Authentication Credentials

Getting Your Bearer Token

  1. Open Chrome and navigate to the SBC Ladder application
  2. Open Chrome Developer Tools (Right-click → Inspect or Ctrl+Shift+I / Cmd+Option+I)
  3. Go to the "Network" tab and filter for "token"
  4. Log in to the SBC Ladder application
  5. Find the request to https://sbc.us.auth0.com/oauth/token
  6. In the response, copy the id_token value - this is your bearer token

Finding Partner IDs

  1. Ask your partner to visit the SBC Ladder site and check their network tab
  2. Look for a request to https://sbc-ladder.kgignatyev.com/badminton/api/v1/members/myself
  3. The response will contain their member ID in the format like "7_1713"

Setting Up on Val.Town

  1. Log in to your Val.Town account
  2. Go to Settings → Environment Variables (https://val.town/settings/environment-variables)
  3. Add two environment variables:
    • SBC_TOKEN: Paste your bearer token here
    • SBC_PLAYER_2_ID: Paste your partner's ID here

Scheduling the Registration Script

  1. Create a new val with the provided SBC Ladder Client code
  2. Set the cron expression to */15 * * * 3 to run every 15 minutes on Wednesdays

Troubleshooting

  • Tokens expire after 24 hours - update your SBC_TOKEN regularly
  • Check the logs in Val.Town to see any error messages
  • Verify your partner's ID is correct and active in the system

Remember that your environment variables are private, even if your val is public. The script will automatically use these variables when it runs.

HTTP
  • main.tsx
    xxxjjj--24…44.web.val.run
Code
README.md
H
main.tsx
Go to top
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Product
FeaturesPricing
Developers
DocsStatusAPI ExamplesNPM Package Examples
Explore
ShowcaseTemplatesNewest ValsTrending ValsNewsletter
Company
AboutBlogCareersBrandhi@val.town
Terms of usePrivacy policyAbuse contact
© 2025 Val Town, Inc.