{"record":{"id":"8842b43b69e72e05","repo":"gitroomhq/postiz-app","slug":"this-integration-requires-an-external-url-and-is-n","errorCode":null,"errorMessage":"This integration requires an external URL and is not supported via the public API","messagePattern":"This integration requires an external URL and is not supported via the public API","errorType":"http","errorClass":"HttpException","httpStatus":400,"severity":"warning","filePath":"apps/backend/src/public-api/routes/v1/public.integrations.controller.ts","lineNumber":359,"sourceCode":"        .getAllowedSocialsIntegrations()\n        .includes(integration)\n    ) {\n      throw new HttpException({ msg: 'Integration not allowed' }, 400);\n    }\n\n    // A provider migrated via MIGRATE_PROVIDERS reconnects through its target\n    // provider's OAuth: the callback lands on the target and the channel is\n    // migrated in place (see migrateIntegration).\n    const migrateTo = refresh\n      ? this._integrationManager.getMigrationTarget(integration)\n      : undefined;\n\n    const integrationProvider = this._integrationManager.getSocialIntegration(\n      migrateTo || integration\n    );\n\n    if (integrationProvider.externalUrl) {\n      throw new HttpException(\n        {\n          msg: 'This integration requires an external URL and is not supported via the public API',\n        },\n        400\n      );\n    }\n\n    try {\n      const { codeVerifier, state, url } =\n        await integrationProvider.generateAuthUrl();\n\n      if (refresh) {\n        await ioRedis.set(`refresh:${state}`, refresh, 'EX', 3600);\n      }\n\n      await ioRedis.set(`organization:${state}`, org.id, 'EX', 3600);\n      await ioRedis.set(`login:${state}`, codeVerifier, 'EX', 3600);\n","sourceCodeStart":341,"sourceCodeEnd":377,"githubUrl":"https://github.com/gitroomhq/postiz-app/blob/0f1647f7491a217d43eb5ae7a480484bdf0aff3e/apps/backend/src/public-api/routes/v1/public.integrations.controller.ts#L341-L377","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":"null","typeGuard":"// Check the provider's integration definition for externalUrl before calling\nconst isPublicApiConnectable = (provider: IntegrationProvider): boolean =>\n  !provider.externalUrl;","tryCatchPattern":"try {\n  const { url } = await api.getIntegrationUrl(integrationId);\n} catch (e) {\n  if (e?.response?.data?.msg?.includes('external URL')) {\n    // fall back to connecting manually in the web UI\n  }\n}","preventionTips":["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"],"tags":["integrations","oauth","unsupported","public-api"],"backgroundTag":"unsupported-oauth-flow","analyzedSha":"0f1647f7491a217d43eb5ae7a480484bdf0aff3e","analyzedAt":"2026-08-27T12:09:55.020Z","schemaVersion":2},"datasetVersion":"2026-08-27T13:17:12.746Z"}