Before you start
Ask us to register your app. Send us:- your app’s name as members should see it;
- its exact redirect URI;
- optionally, the organiser theme to brand sign-in with.
yourclub-v1. There’s no client secret:
a secret can’t be kept inside an app.
The theme is one of yours under Settings → Branding in the dashboard; send
us its address. With it, the sign-in, sign-up and password reset pages your
members pass through show your logo and name instead of Let’s Do This’s. Use
the same theme as your membership scheme so members see one brand throughout.
You can ask us to change it at any time, without releasing a new version of
your app.
Use a claimed https link as your redirect URI: an iOS Universal Link or an
Android App Link, such as
https://yourclub.example/app/oauth. The phone
checks that the link belongs to your app, so members who have approved your
app before can reconnect without being asked again. A custom scheme must be in
reverse-domain form, such as com.yourclub.app:/oauth, and members are asked
to approve your app every time it connects.How it works
1
Open the connect page in the system browser
Open
https://www.letsdothis.com/connect with the parameters below in the
phone’s browser: ASWebAuthenticationSession on iOS, Custom Tabs on
Android. AppAuth does this for you.2
The member signs in and approves
The member signs in or creates an account, sees what your app asks for,
and taps Allow.
3
Your app receives a code
We redirect to your redirect URI with
code, state and iss.4
Exchange the code for tokens
Your app posts the code and its PKCE verifier to the token endpoint and
gets an access token and a refresh token.
5
Call the API as the member
Send the access token as
Authorization: Bearer <token>.Authorization request
If the member cancels, the redirect carries
error=access_denied instead of a
code.
Tokens
Token requests useapplication/x-www-form-urlencoded.
Exchange the code (POST https://api.letsdothis.com/v0/account/token):
grant_type=refresh_token, refresh_token and client_id.
Each refresh returns a new refresh token; store it and discard the old one.
Reusing an old refresh token disconnects the member, as it suggests the token
was copied.
Log out with POST https://api.letsdothis.com/v0/account/token/revoke,
sending token and client_id. It always answers 200.
Access tokens last an hour. A refresh token expires after 60 days without
use, and in any case 12 months after the member approved your app; after that
the member connects again.
Client libraries can discover these endpoints at
https://api.letsdothis.com/.well-known/oauth-authorization-server.
What a member token reaches
Every other endpoint answers
403 with MEMBER_TOKEN_NOT_ALLOWED. A seat or
policy that isn’t the member’s answers 404, the same as one that doesn’t
exist. A secondary member asking for something only the paying member can do
gets 403 with MEMBERSHIP_PRIMARY_MEMBER_ONLY.
Your app’s responsibilities
- Use the system browser, never a WebView. Embedded browsers can read what the member types, and Google refuses to sign in inside them.
- Use PKCE with S256 and a fresh verifier for every sign-in.
- Check
statewhen the member comes back, and drop the response if it doesn’t match. - Store tokens in the platform’s secure storage: the iOS Keychain or the Android Keystore.
- Keep the latest refresh token after every refresh.
- Handle a
401by refreshing once, and if that fails, asking the member to connect again. Members can be disconnected when they reset their password, delete their account, or when we disable your app.

