gitroomhq/postiz-app · warning · HttpException
This integration requires an external URL and is not support
Error message
This integration requires an external URL and is not supported via the public API
What it means
getIntegrationUrl looks up the provider implementation; if it defines externalUrl (i.e. the provider's connection flow happens on an external site rather than in-app OAuth), the public API refuses to generate an auth URL and throws 400 explaining it's unsupported via the public API.
Source
Thrown at apps/backend/src/public-api/routes/v1/public.integrations.controller.ts:359
.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',
},
400
);
}
try {
const { codeVerifier, state, url } =
await integrationProvider.generateAuthUrl();
if (refresh) {
await ioRedis.set(`refresh:${state}`, refresh, 'EX', 3600);
}
await ioRedis.set(`organization:${state}`, org.id, 'EX', 3600);
await ioRedis.set(`login:${state}`, codeVerifier, 'EX', 3600);
View on GitHub (pinned to 0f1647f749)
Solutions
- Connect this provider manually through the web UI instead of the public API — it cannot be automated
- Automate only OAuth-redirect providers via this endpoint
- Check the provider's integration class for externalUrl to confirm before attempting
Defensive patterns
Strategy: type-guard
Validate before calling
null
Type guard
// Check the provider's integration definition for externalUrl before calling const isPublicApiConnectable = (provider: IntegrationProvider): boolean => !provider.externalUrl;
Try / catch
try {
const { url } = await api.getIntegrationUrl(integrationId);
} catch (e) {
if (e?.response?.data?.msg?.includes('external URL')) {
// fall back to connecting manually in the web UI
}
} Prevention
- Automate only OAuth-redirect providers via the public API
- Treat externalUrl providers as UI-only connections
- Document which providers are public-API-connectable per version
When it happens
Trigger: GET on the integration URL route for a provider whose integration class sets externalUrl — typically providers where you sign up/connect on the vendor's own dashboard rather than via an OAuth redirect the API can initiate.
Common situations: Developers trying to automate connection of such providers via the public API and discovering it's intentionally unsupported; provider set changes across versions adding more externalUrl providers.
Related errors
- Failed to generate auth URL
- Organization not found
- Integration not allowed
- Integration not allowed
- Integration not allowed
AI-assisted analysis of gitroomhq/postiz-app@0f1647f749 (2026-08-27).
Data as JSON: /api/errors/8842b43b69e72e05.
Report an issue: GitHub.