Skip to main content

Link WPPR

This guide explains how to let a player connect their WPPR profile to their account in your product, and what you receive when they do.

You add one button. The player proves the number is theirs on WeCourts and comes straight back to you. From then on you hold the verified number and their WPPR profile, and read the rating with your own token. The player is never asked again.

For AI agentsBuilding with an AI coding agent?

Point it at /llms/link-wppr.md — a self-contained implementation reference with the full API contract, a plan per platform, and the verification checklist it should run before declaring done.

Claude Code users can install it as a skill instead, so /link-wppr (or just asking for the integration) picks it up:

mkdir -p .claude/skills/link-wppr && curl -fsSL https://developers.wecourts.com/llms/link-wppr-skill.md -o .claude/skills/link-wppr/SKILL.md

The flow​

Two surfaces on our side, and they are not interchangeable. The WPPR Developer Portal takes your token, server-to-server. The WeCourts link page is what the player looks at in a browser. Your token never goes near the second one.

YOUWECOURTSYour appwebview or browser tabYour backendholds the API tokenWPPR Developer Portalserver-to-server, your tokenWeCourts link pagewhat the player seesplayer taps “Link WPPR”1POST /link/sessions2link_url · 1 hour, single useopen link_url3consent → phone → codeclaim or create profileredirect to your redirect_uri ?code=…&state=…4code + state5POST /link/exchange6phone_number + playerlater, any time, with no player involvedGET /players/search/by-phone/{digits}

What your users see​

The WeCourts sign-up flow inside your app, branded for your product. Use the buttons on the screen to walk it. The frame takes the colour of whoever is serving what the player is looking at.

Everyone starts on the intro. If a player is already signed in to WeCourts in that browser, we greet them by name and they link in one tap. No code, nothing to type.

Everyone else verifies a phone number. The number screen is skipped when you passed one. Once the code checks out, the number decides what happens next: a number WeCourts already knows links on the spot, and a new one goes through the standard WeCourts sign-up (name, birthday, playing details, and a chance to claim an existing profile). The screens below compress those steps for presentation; the real journey is the full sign-up. Every path ends in the same place, with the same payload.

Where will your Link WPPR button live?

It decides the screens your players see and how they get back to you. The rest of the guide follows your answer, and you can switch at any point.

Your name, logo and colour come from your partner registration, which we hold and edit on our side — send us the assets when you onboard (or when they change) and every open link session picks them up immediately. Rebranding never needs a release on yours.

Build it​

Seven steps, in three groups. Prepare is done once, before you ship. The flow is the four calls that run every time a player taps the button. After linking is how you read a rating from then on, with the player no longer involved. Each step carries the call it makes and the rules that apply to it; durations and failure codes live in Errors, so the steps point there rather than repeating them.

For AI agentsBuilding with an AI coding agent?

Point it at /llms/link-wppr.md — a self-contained implementation reference with the full API contract, a plan per platform, and the verification checklist it should run before declaring done.

Claude Code users can install it as a skill instead, so /link-wppr (or just asking for the integration) picks it up:

mkdir -p .claude/skills/link-wppr && curl -fsSL https://developers.wecourts.com/llms/link-wppr-skill.md -o .claude/skills/link-wppr/SKILL.md
I'm building for
Prepareonce
The flowevery tap
After linkingongoing
Your backend

Register your redirect URL

Two things before you write any code. First, keep your API key on your server. Never put it in app or web code.

Second, register your redirect origin: the address we send players back to when they finish. Each API key has one origin. Calling this endpoint again replaces it.

POST/api/v1/link/redirect-uri
{ "uri": "https://example.com" }

Send any URL. We keep the scheme and host; a path, query, or fragment is ignored. Once registered, any redirect URL on that scheme and host is allowed.

examples
✅ https://example.com
✅ https://example.com:8443
✅ http://localhost:5173               local testing
✅ myapp://wppr                        mobile deep link
✅ https://example.com/wppr/callback   stored as https://example.com
❌ example.com                         not a URL (missing scheme)
❌ https://user:[email protected]       no credentials
Polling mode never redirects, so it needs no registration at all. Step 3 covers which of the two you are building; Developing locally covers testing either one on your machine.