Who Can Manage OAuth Applications
Any member of the organization can create and manage OAuth applications. Some things need an organization admin: creating an application that uses the Client Credentials grant (it must act as a service account), and registering the admin-only scopes listed under Select Scopes.Navigating to OAuth Settings
To access the OAuth application management page:- Sign in to your PipesHub account
- Open Workspace settings
- Select OAuth 2.0 apps under Developer settings


Creating a New OAuth Application
Follow these steps to register a new OAuth application.Step 1: Open the Application Registration Form
From the OAuth 2.0 apps page, click the New OAuth application button.Step 2: Provide Application Details
Fill in the following fields:

Step 3: Configure Grant Types
Select the authorization grant types that your application requires:Client Credentials
Client Credentials
- Background services or automation scripts
- Machine-to-machine integrations
- Scheduled tasks that access organizational data
Refresh Token
Refresh Token
offline_access scope is requested during the authorization code flow.Key details:- Refresh tokens are rotated on each use — the old token is revoked and a new one is issued
- Your application should always store the latest refresh token
- Refresh tokens have a default lifetime of 30 days (configurable per application)
Step 4: Add Redirect URIs
Redirect URIs define where PipesHub sends users after they authorize (or deny) access. You may register up to 10 redirect URIs per application.

- All redirect URIs must use HTTPS, except for
localhostand127.0.0.1(permitted for local development) - The URI provided during the authorization request must exactly match one of the registered URIs
- Redirect URIs are required when the Authorization Code grant type is enabled
Step 5: Select Scopes
Scopes define the specific permissions your application is requesting. Select only the scopes your application genuinely needs — following the principle of least privilege.

Identity & Access Scopes
Identity & Access Scopes
Organization Scopes
Organization Scopes
User Management Scopes
User Management Scopes
User Groups & Teams Scopes
User Groups & Teams Scopes
Knowledge Base Scopes
Knowledge Base Scopes
Search & Conversations Scopes
Search & Conversations Scopes
Agents & Skills Scopes
Agents & Skills Scopes
MCP Servers Scopes
MCP Servers Scopes
Actions Scopes
Actions Scopes
toolset:*.Projects Scopes
Projects Scopes
Connectors Scopes
Connectors Scopes
Code Scopes
Code Scopes
Configuration Scopes
Configuration Scopes
Crawling Scopes
Crawling Scopes
org:write, org:admin, user:invite, user:delete, usergroup:write, team:write, config:write, crawl:write and crawl:delete.
Step 6: Save and Store Credentials
After submitting the form, PipesHub generates a unique Client ID and Client Secret for your application.

Authorization Flow
The following diagram illustrates how the OAuth 2.0 Authorization Code flow operates within PipesHub.Step-by-Step Breakdown
Initiate Authorization
User Authentication
User Consent


Authorization Code
Exchange Code for Tokens
code_verifier instead of client_secret:refresh_token only when the granted scopes include offline_access. Add it to scope in the authorization request if your app needs to refresh tokens.Access Protected Resources
openid scope you can read the user’s profile:Client Credentials Flow
For server-to-server integrations with no interactive user. The application must have been created with a service account, and the token acts as that service account:Refreshing Tokens
When an access token expires, use the refresh token to obtain a new one without requiring user interaction:Revoking Tokens
To revoke an access token or refresh token when it is no longer needed:token_type_hint to either access_token or refresh_token to help the server identify the token type more efficiently.
Device Authorization Flow
Use the device flow (RFC 8628) for a CLI, a coding agent or any tool that cannot open a browser redirect. The tool shows a short code, the user approves it in a browser, and the tool polls for the token. The device grant is on by default. An administrator turns it off by settingPIPESHUB_ENABLE_DEVICE_GRANT=false on the backend.
Which client_id to use. Every instance has a built-in public client for this flow. Its client_id is pipeshub-agent, and discovery returns it as pipeshub_device_client_id. It allows only the device and refresh token grants and needs no client secret. It does not appear in Developer settings. Applications you create in Developer settings cannot select the device grant.
Request a device code
scope, the request gets every scope the client allows.Ask the user to approve
user_code and verification_uri, or open verification_uri_complete. The user signs in to PipesHub, checks the code and the requested permissions, and approves or denies. The code expires after expires_in seconds (10 minutes).Poll for the token
interval seconds:error values:Dynamic Client Registration
PipesHub supports dynamic client registration (RFC 7591) atPOST /api/v1/oauth2/register. It lets a client such as an MCP client create its own OAuth application without an administrator.
Registration is off by default, because anyone who can reach the instance could register an application. While it is off, the endpoint returns 403 with "error": "access_denied". An administrator turns it on by setting PIPESHUB_ENABLE_DCR=true on the backend.
201 with the new client_id and the registered metadata. It includes a client_secret only when token_endpoint_auth_method is client_secret_basic or client_secret_post.
Rules for registered clients:
grant_typesdefaults toauthorization_codeandrefresh_token.client_credentialsis refused. Addurn:ietf:params:oauth:grant-type:device_codeif the client will use the device flow.redirect_urisis required withauthorization_code, up to 10 URIs.token_endpoint_auth_methoddefaults tonone(a public client).- Each requested scope must be one a regular member may hold and, when
MCP_SCOPESis set, one listed there. Otherwise the request fails withinvalid_client_metadata. - The application belongs to the instance’s organization. The consent screen tells users that the application registered itself.
Discovery Endpoints
These endpoints are public and need no authentication. They are served at the root of the instance, not under/api/v1.
scopes_supported, and grant_types_supported. Some fields appear only when the feature is on:
/mcp lists only the scopes the MCP tools use. See MCP Server Overview.
Managing OAuth Applications
Viewing Application Details
Click on any application from the list to view its configuration, including the client ID, allowed scopes, grant types, redirect URIs, and token settings.

Regenerating the Client Secret
If your client secret has been compromised or needs to be rotated:- Open the application detail page
- Click Generate new client secret
- Copy and securely store the new secret immediately
Suspending an Application
If you need to temporarily disable an application without deleting it:- Select Manage on the application to open its panel
- Open the Advanced tab
- Click Suspend application
Deleting an Application
Deleting an OAuth application:- Revokes all active access tokens and refresh tokens associated with the application
- Permanently marks the application as revoked
- Select Manage on the application to open its panel
- Open the Advanced tab
- Click Delete application
- Confirm by putting the application name in dialog box
Revoking Active Tokens
From the application panel, you can:- Revoke all tokens at once, which is useful in the event of a security incident
- Select Manage on the application to open its panel
- Open the Advanced tab
- Under Revoke all tokens, click Revoke tokens
- Confirm by putting the application name in dialog box
Security Best Practices
Store Secrets Securely
Use PKCE for Public Clients
Request Minimal Scopes
Validate the State Parameter
state value for each authorization request and verify it in the callback to prevent cross-site request forgery (CSRF) attacks.Handle Token Rotation
Revoke Tokens on Sign-Out
API Endpoints Reference
The following table provides a quick reference for all OAuth 2.0 endpoints:Troubleshooting
Token exchange fails with 'invalid_grant'
Token exchange fails with 'invalid_grant'
- The authorization code has expired (codes are valid for 10 minutes)
- The authorization code has already been used
- The
redirect_uriin the token request does not match the one used during authorization - For PKCE: the
code_verifierdoes not match the originalcode_challenge
Refresh token is rejected
Refresh token is rejected
- The refresh token has been rotated and the old token was used instead of the most recent one
- The refresh token has expired
- The application or its tokens have been revoked by an administrator
API request returns 403 Forbidden
API request returns 403 Forbidden
- The access token does not include the required scope for the requested endpoint
- The user does not have sufficient permissions within the organization
FAQ
Can non-admin users create OAuth applications?
Can non-admin users create OAuth applications?
What happens when I regenerate a client secret?
What happens when I regenerate a client secret?
Is there a limit on the number of OAuth applications?
Is there a limit on the number of OAuth applications?
Does PipesHub support PKCE?
Does PipesHub support PKCE?
S256 challenge method is accepted.