Documentation Index
Fetch the complete documentation index at: https://docs.mightynetworks.com/llms.txt
Use this file to discover all available pages before exploring further.
Overview
An OAuth application is the credential a third-party app uses to ask members, hosts, and admins of a Mighty Network for permission to act on their behalf. It is the entry point to the Headless API: every access token the Headless API issues comes from a user authorizing one of your OAuth applications. You create an OAuth application once per integration, in the network it should operate against. The application owns:- A Client ID that identifies the app on every authorization request.
- A Client Secret (for confidential clients) that authenticates the app when exchanging an authorization code for a token.
- One or more Redirect URIs the authorization server is allowed to redirect back to after a user approves access.
- A set of Scopes the application is permitted to request — the upper bound on what an issued token can do.
Creating OAuth applications is available on Scale plans and above (Scale, Growth and Mighty Pro). The Headless API is in alpha and is being rolled out incrementally. If you don’t see Integrations > OAuth Applications in Network Admin, your network isn’t in the rollout yet.
Create an OAuth application
OAuth applications are created and managed from Network Admin.Open Integrations settings
Sign in to your network as a host or admin. Open Network Admin, then go to Integrations > OAuth Applications.
Name the application
Enter a Name for the application. The name is shown to users on the consent screen — pick something a member would recognize as the integration they’re authorizing (for example, the product or company name).
Choose a client type
Select Confidential if the application runs on a server you control and can keep a secret (a web backend, a back-office job, a server-to-server integration).Select Public if the application runs on a device you don’t control (a native mobile app, a desktop app, a single-page web app). Public clients do not receive a Client Secret and must use the Authorization Code flow with PKCE.
Add redirect URIs
Enter the URL the authorization server is allowed to redirect users back to after they approve or deny the request. To register multiple URIs (one per environment — production, staging, local development), enter them in a single field separated by newlines. Redirect URIs are matched exactly — including scheme, host, port, and path.Local development URLs (
http://localhost:3000/oauth/callback) are accepted. All other redirect URIs must use https.Select member scopes
Choose the member scopes the application is allowed to request — these govern access to the authorized user’s own content (their posts, comments, courses, profile).
Select host scopes
Choose the host scopes the application is allowed to request — these grant network-wide reads and only take effect when the authorized user is a host of the network. Leave empty if your integration doesn’t act on behalf of hosts.Across both scope fields, request the narrowest set that lets the feature work. The application can request any subset of the configured scopes per authorization, but never more — and users see the full list on the consent screen, so broader scopes drive higher abandonment.
Copy your credentials
Mighty issues a Client ID and (for confidential clients) a Client Secret.The Client Secret is shown once and cannot be recovered. Copy it into your secret store before leaving the page. If you lose it during alpha, delete the application and create a new one (programmatic secret rotation will land before GA).
Configuration
Redirect URIs
The authorization server only redirects back to URIs registered on the application. The match is exact —https://example.com/cb will not match https://example.com/cb/, https://example.com/cb?x=1, or https://www.example.com/cb. Register every variant your app uses.
Multiple URIs are registered as a single newline-separated value.
Guidelines:
- One URI per environment (production, staging, dev, local), separated by newlines.
- Use
httpsfor everything excepthttp://localhostandhttp://127.0.0.1. - Avoid open redirectors. The registered URI should point at an endpoint your app controls and that validates the
stateparameter before issuing the token exchange.
Scopes
Scopes are coarse permissions an application can ask a user to grant. The token the Headless API issues is the intersection of the scopes the user approves and what that user can do in the product. Aread:posts scope granted to a member only exposes what the member could already see; a host:read:network_posts scope is only effective when the authorized user is a host of the network.
Scopes split into two families: member scopes that govern access to the authorized user’s own content, and host scopes (prefixed host:) that grant network-wide reads and only take effect when the authorized user is a host of the network.
If a host scope is requested on an authorization request, only hosts of the network will be able to complete the flow — non-host users (members, moderators) are blocked at the consent screen and cannot sign in to your application. Configure host scopes only on applications meant for host-facing integrations, and request them only on authorization requests where the user is expected to be a host.
| Scope | Description |
|---|---|
read:userinfo | View the user’s basic profile information. |
read:posts | View posts the user has created. |
read:courses | View the user’s courses and course progress. |
read:search | Search network content on the user’s behalf. |
write:posts | Create, edit, and delete posts on the user’s behalf. |
write:comments | Create, edit, and delete comments on the user’s behalf. |
| Scope | Description |
|---|---|
host:read:network_events | View events in the network. |
host:read:network_spaces | View spaces in the network. |
host:read:network_members | View members in the network. |
host:read:network_plans | View plans in the network. |
host:read:network_posts | View posts in the network. |
Client type
| Client type | Receives secret | Auth method | Use it for |
|---|---|---|---|
| Confidential | Yes | client_secret on /oauth/token | Server-side web apps, back-office jobs, machine-to-machine flows |
| Public | No | PKCE (code_verifier) on /oauth/token | Native mobile apps, desktop apps, single-page web apps, CLIs |
code_verifier alongside client_secret for defense in depth.
Using your credentials
Once the application is created, use the Client ID (and Secret, if confidential) to drive the Authorization Code flow against your network’s OAuth endpoints. OAuth endpoints are served from the network’s community host (notapi.mn.co):
https://:network_subdomain.mn.co/.well-known/oauth-authorization-server (RFC 8414).
For the complete request/response shapes — including PKCE, state, refresh tokens, and error handling — see Authentication and the OAuth flow walkthrough in Headless API.
access_token, refresh_token, expires_in, and the granted scope. Pass the access_token as a Bearer token on every Headless API request.
Manage an existing application
Edit configuration
From Network Admin > Integrations > OAuth Applications, open an application to update its name, redirect URIs, or allowed scopes. Configuration changes take effect on the next authorization request — existing access tokens are unaffected until they expire. Tightening scopes does not retroactively narrow tokens that have already been issued. To revoke broad access immediately during alpha, delete the application.Delete the application
To permanently retire an OAuth application:- Open the application from Network Admin > Integrations > OAuth Applications.
- Click Delete application.
- Confirm.
Programmatic client-secret rotation and per-token revocation are not yet exposed in alpha. Until they ship, the supported way to invalidate a leaked secret or kill an outstanding token is to delete the application (which revokes every token under it) and create a replacement. Both capabilities will land before GA.
Security best practices
- Treat the Client Secret like a password. Store it in a secret manager (1Password, AWS Secrets Manager, GCP Secret Manager, Vault). Never check it into source control or ship it in a client bundle.
- Use PKCE everywhere. Public clients must use PKCE; confidential clients should too.
- Validate
state. Generate a cryptographically randomstateper authorization request and reject any callback whosestatedoesn’t match. - Pin redirect URIs. Register the exact URIs your app uses. Never register a wildcard, a path you don’t control, or an open redirector.
- Request least privilege. Ask for the narrowest scopes that let the feature work. Broader scopes increase consent abandonment and expand the blast radius if a token leaks.
- Replace applications on suspicion of secret leak. During alpha, programmatic secret rotation is not yet available. If a secret may have leaked — a former contributor with access, a misconfigured log, a compromised build — delete the application (which revokes every token under it) and create a replacement.
Troubleshooting
invalid_client on token exchange
- Check that the Client ID matches the application exactly.
- For confidential clients, verify the Client Secret hasn’t been rotated out from under the deployment.
- For public clients, make sure you’re sending
code_verifierand notclient_secret.
invalid_grant on token exchange
- The authorization code is single-use and expires within a minute or two — make sure you’re not retrying with a code that’s already been redeemed.
- The
redirect_urisent to/oauth/tokenmust exactly match the one used to obtain the code. - For PKCE, the
code_verifiermust match thecode_challengeoriginally sent.
redirect_uri_mismatch on authorize
- The
redirect_uriquery parameter must exactly match one of the URIs registered on the application — scheme, host, port, and path all included.
Consent screen shows the wrong app name
- The consent screen reflects the application’s Name field. Update it in Network Admin > Integrations > OAuth Applications > your app.
Next steps
Headless API
Use your access token against the GraphQL API.
Authentication
OAuth flows, scopes, and token lifecycle in detail.