gitroomhq/postiz-app · error · HttpException
Integration not allowed
Error message
Integration not allowed
What it means
getIntegrationUrl checks the requested integration against integrationManager.getAllowedSocialsIntegrations(); anything not in that allowlist throws 400 'Integration not allowed'. This is a static capability check, independent of the org's connected channels.
Source
Thrown at apps/backend/src/public-api/routes/v1/public.integrations.controller.ts:344
}
: undefined,
}));
}
@Get('/social/:integration')
@CheckPolicies([AuthorizationActions.Create, Sections.CHANNEL])
async getIntegrationUrl(
@Param('integration') integration: string,
@Query('refresh') refresh: string,
@GetOrgFromRequest() org: Organization
) {
Sentry.metrics.count('public_api-request', 1);
if (
!this._integrationManager
.getAllowedSocialsIntegrations()
.includes(integration)
) {
throw new HttpException({ msg: 'Integration not allowed' }, 400);
}
// A provider migrated via MIGRATE_PROVIDERS reconnects through its target
// provider's OAuth: the callback lands on the target and the channel is
// migrated in place (see migrateIntegration).
const migrateTo = refresh
? this._integrationManager.getMigrationTarget(integration)
: undefined;
const integrationProvider = this._integrationManager.getSocialIntegration(
migrateTo || integration
);
if (integrationProvider.externalUrl) {
throw new HttpException(
{
msg: 'This integration requires an external URL and is not supported via the public API',
},View on GitHub (pinned to 0f1647f749)
Solutions
- Check the exact spelling/casing of the integration id against the provider list in code (getAllowedSocialsIntegrations)
- Update to a version that ships the provider, or enable it via config if it's flag-gated
- If the provider was migrated, use the new provider name (see migrateIntegration flow)
- List available integrations via the API/endpoint if one exists instead of guessing names
Example fix
// before GET /public/v1/integrations/twiter/url // after GET /public/v1/integrations/twitter/url
Defensive patterns
Strategy: validation
Validate before calling
const ALLOWED = await api.getAllowedIntegrations(); // or hardcode from docs
if (!ALLOWED.includes(integrationId)) {
throw new Error(`${integrationId} is not enabled in this deployment`);
} Type guard
const isAllowedIntegration = (id: string, allowed: string[]): id is AllowedIntegration => allowed.includes(id);
Try / catch
null
Prevention
- Use exact provider ids from the docs/code allowlist
- Re-check ids after upgrading — providers get renamed/migrated
- Feature-flagged providers need enabling before use
When it happens
Trigger: GET on the integration URL route with a provider name that's disabled/not built in the deployment (e.g. a provider behind a feature flag, an enterprise-only integration, a typo like 'twiter', or a provider removed in that version).
Common situations: Typos in provider IDs; self-hosted builds where some providers are disabled by config; requesting a provider that exists in docs but isn't enabled in that deployment/version; using a legacy provider name after MIGRATE_PROVIDERS renamed it.
Related errors
- Organization not found
- Integration not allowed
- Integration not allowed
- File is too large.
- Unsupported file type.
AI-assisted analysis of gitroomhq/postiz-app@0f1647f749 (2026-08-27).
Data as JSON: /api/errors/ec0f3f772683dc47.
Report an issue: GitHub.