Tutorials Competitive ProgrammingVjudgeCookiesJWT

Binding OJ Accounts with Vjudge: A Tutorial

// desc

Got stuck submitting a problem from an OJ on vjudge? Read this.

Prologue

If you use Virtual Judge (VJudge) to solve problems across multiple platforms, binding your Online Judge (OJ) accounts is essential. It lets VJudge submit code directly on your behalf and track your submissions.

Depending on the OJ's security mechanisms, VJudge allows account binding via Traditional Credentials (Username + Password) or Session Tokens & Cookies (such as JSESSIONID or refresh_token).

This tutorials walks you through both methods using Codeforces and EOLymp as examples.

VJudge Account Binding Interface
Navigate to the Account Binding section in VJudge profile settings.

Method 1: Traditional Binding (Username & Password)

The most straightforward way to link an account is using your standard login credentials.

How It Works

When you provide your username and password, VJudge simulates a login request directly to the target OJ to obtain a session on your behalf.

Steps to Bind:

  1. Log into your VJudge account and navigate to Manage Accounts.
  2. Find Codeforces from the list.
  3. Enter your Username / Handle and Password for CF.
  4. Click Bind Directly to save yourself some hassle.

Note: If an OJ implements modern bot protection (e.g., CAPTCHA on login), this method will fail with an authorization error. You must use session token/cookie binding instead.

Standard Username and Password Binding in VJudge
Standard Username and Password Binding in VJudge
Standard Username and Password Binding in VJudge
Standard Username and Password Binding in VJudge
Standard Username and Password binding on VJudge.

For platforms protected by Cloudflare or strict authentication protocols, entering plain passwords won't work. Instead, you extract active session cookies or tokens from your browser and pass them to VJudge. A good example is EOLymp.


Steps to Bind:

  1. Log into EOLymp: Open EOLymp and sign into your account.
  2. Open Developer Tools: Press F12 to open DevTools.
  3. On firefox or its derivatives, navigate to Storage and expand the dropdown named Cookies. Look for a key named refresh_token. On chrome and its derivatives, the cookies can be found under the Application tab of the DevTools. The steps are identical on all browsers but the screenshots included here are taken from a firefox based browser.
  4. Copy the Value: Copy the full refresh_token string from the Value field (format: xxxx-xxxxxxxxxxxxxxxxxxxx...).
  5. Paste into VJudge:
    • Navigate to the same Manage Accounts page.
    • Select EOLymp from the OJs.
    • Paste the token into the refresh_token field and hit Bind Directly.
Binding EOLymp with VJudge
Binding EOLymp with VJudge
Binding EOLymp with VJudge
Binding EOLymp with VJudge
Finding the EOLymp refresh token via DevTools and binding it with VJudge.

Troubleshooting & Best Practices

  • Expired Sessions: Cookies and refresh tokens expire periodically (or when you manually log out of the main site). If VJudge shows Account Unauthorized or fails to submit, repeat the cookie/token extraction steps.
  • Don't Log Out: Logging out directly on Codeforces or EOLymp invalidates the active session token instantly. Simply close the browser tab instead of clicking "Log Out".
  • Security: Session cookies give full access to your accounts. Never share your JSESSIONID or refresh_token publicly.

// comments