postiz-app
postiz-app copied to clipboard
Cannot add channels - "Could not add provider" error when trying to add Instagram or other providers
When attempting to add any channel (Instagram, etc.), I receive the following error and the channel is not added:
Adding channel, Redirecting You
Could not add provider.
You are being redirected back
Steps to Reproduce:
Log in to Postiz instance
Navigate to Channels
Click "Add Channel"
Select any provider (Instagram, etc.)
Get redirected with the error message
Expected Behavior: The channel should be successfully added after authentication.
Actual Behavior: Authentication fails with the error message and no channel is added.
Environment:
Self-hosted Postiz using Docker
Latest image: ghcr.io/gitroomhq/postiz-app:latest
Configuration: Here's my docker-compose.yml :
services:
postiz:
image: ghcr.io/gitroomhq/postiz-app:latest
container_name: postiz
restart: unless-stopped
environment:
# You must change these. Replace `postiz.your-server.com` with your DNS name - this needs to be exactly the URL you're accessing Postiz on.
MAIN_URL: "https://postiz.mydoomain.com"
FRONTEND_URL: "https://postiz.mydoomain.com/"
NEXT_PUBLIC_BACKEND_URL: "https://postiz.mydoomain.com/api"
JWT_SECRET: "SqgRrNNg6ThNeqAmCdtCffOgRrNNg6ThNeqAmCdtCffOgRrNNg6ThNeqAmCdtCffOgRrNNg6ThNeqAmCdtCffOm7"
# These defaults are probably fine, but if you change your user/password, update it in the
# postiz-postgres or postiz-redis services below.
DATABASE_URL: "postgresql://postiz-user:postiz-password@postiz-postgres:5432/postiz-db-local"
REDIS_URL: "redis://postiz-redis:6379"
BACKEND_INTERNAL_URL: "http://localhost:3000"
IS_GENERAL: "true" # Required for self-hosting.
DISABLE_REGISTRATION: "true" # Only allow single registration, then disable signup
# The container images are pre-configured to use /uploads for file storage.
# You probably should not change this unless you have a really good reason!
STORAGE_PROVIDER: "local"
UPLOAD_DIRECTORY: "/uploads"
NEXT_PUBLIC_UPLOAD_DIRECTORY: "/uploads"
#Youtube
YOUTUBE_CLIENT_ID: "my google id"
YOUTUBE_CLIENT_SECRET: "my google secret"
#TikTok
TIKTOK_CLIENT_ID: "my tiktok id"
TIKTOK_CLIENT_SECRET: "my tiktok secret"
#Instagram
INSTAGRAM_APP_ID: "my istagram id"
INSTAGRAM_APP_SECRET: "my istagram secret"
######
FACEBOOK_APP_ID: ""
FACEBOOK_APP_SECRET: ""
X_API_KEY: ''
X_API_SECRET: ''
THREADS_APP_ID: ''
THREADS_APP_SECRET: ''
TELEGRAM_BOT_NAME: ''
TELEGRAM_TOKEN: ''
SLACK_ID: ''
SLACK_SECRET: ''
REDDIT_CLIENT_ID: ''
REDDIT_CLIENT_SECRET: ''
PINTEREST_CLIENT_ID: ''
PINTEREST_CLIENT_SECRET: ''
MASTODON_CLIENT_ID: ''
MASTODON_CLIENT_SECRET: ''
LINKEDIN_CLIENT_ID: ''
LINKEDIN_CLIENT_SECRET: ''
DISCORD_CLIENT_ID: ''
DISCORD_CLIENT_SECRET: ''
volumes:
- C:/Users/user/docker/postiz-app/postiz-config:/config/
- C:/Users/user/docker/postiz-app/postiz-uploads:/uploads/
ports:
- 5002:5000
networks:
- postiz-network
depends_on:
postiz-postgres:
condition: service_healthy
postiz-redis:
condition: service_healthy
postiz-postgres:
image: postgres:17-alpine
container_name: postiz-postgres
restart: unless-stopped
environment:
POSTGRES_PASSWORD: postiz-password
POSTGRES_USER: postiz-user
POSTGRES_DB: postiz-db-local
volumes:
- C:/Users/user/docker/postiz-app/postgres-volume:/var/lib/postgresql/data
networks:
- postiz-network
healthcheck:
test: pg_isready -U postiz-user -d postiz-db-local
interval: 10s
timeout: 3s
retries: 3
postiz-redis:
image: redis:7.2
container_name: postiz-redis
restart: unless-stopped
healthcheck:
test: redis-cli ping
interval: 10s
timeout: 3s
retries: 3
volumes:
- C:/Users/user/docker/postiz-app/postiz-redis-data:/data
networks:
- postiz-network
volumes:
postgres-volume:
external: false
postiz-redis-data:
external: false
postiz-config:
external: false
postiz-uploads:
external: false
networks:
postiz-network:
external: false
Additional Information:
All required environment variables for the providers are set (Instagram, YouTube, TikTok)
The instance is accessible at https://postiz.mydoomain.com
No relevant errors appear in the container logs when this occurs
The redirect happens immediately after clicking the provider, before any authentication flow begins
Questions:
Are there any additional configuration requirements for adding channels? Could this be related to URL configuration or SSL certificates? (I am using cloudflare domain) Are there any known issues with the channel provider authentication flow?
+1 updated today to latest and facing same issue. Was able to access tiktok previously.
Can you please try again on the latest version?
Can you please try again on the latest version?
I just updated and it is still the same error
I have this same issue. New setted up instance of postiz. After redirect from ext. provider:
Same problem here. Just fired up Postiz again after the revamp and tried to add Facebook and Instagram. Facebook lets you set permissions and it shows that Postiz is added, but I get the same issue that the previous posters.
On my end this error occurs because of SSL issues when inside corporate VPN. Normally we solve this by installing a root certificate in the affected image. Is there currently a recommended way to do this?
@nevo-david Logs:
But is not very descriptive. I only see a unhandled exception which crash backend. I'm hosted a postiz using Docker compose with Traefik as reverse proxy and lets encrypt as ssl provider on Traefik level.
Here is my log:
postiz | 1|backend | [Nest] 420 - 08/06/2025, 10:52:39 AM LOG 🚀 Backend is running on: http://localhost:3000
postiz | 1|backend | /app/apps/backend/dist/libraries/nestjs-libraries/src/integrations/social/facebook.provider.js:165
postiz | 1|backend | .filter((d) => d.status === 'granted')
postiz | 1|backend | ^
postiz | 1|backend | TypeError: Cannot read properties of undefined (reading 'filter')
postiz | 1|backend | at FacebookProvider.authenticate (/app/apps/backend/dist/libraries/nestjs-libraries/src/integrations/social/facebook.provider.js:165:14)
postiz | 1|backend | at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
postiz | 1|backend | at async /app/apps/backend/dist/apps/backend/src/api/routes/integrations.controller.js:228:26
postiz | 1|backend | Node.js v20.18.1
postiz | 1|backend |  ELIFECYCLE  Command failed with exit code 1.
postiz | 1|backend |  WARN  Local package.json exists, but node_modules missing, did you mean to install?
postiz | PM2 | App [backend:1] exited with code [1] via signal [SIGINT]
postiz | PM2 | App [backend:1] starting in -fork mode-
postiz | PM2 | App [backend:1] online
postiz | PM2 | App [backend:1] starting in -fork mode-
postiz | PM2 | App [backend:1] online
postiz | 1|backend | > [email protected] start /app/apps/backend
postiz | 1|backend | > dotenv -e ../../.env -- node ./dist/apps/backend/src/main.js
postiz | 1|backend | [Nest] 481 - 08/06/2025, 2:04:13 PM LOG [NestFactory] Starting Nest application...
I have the same error
postiz | 2|backend | [Nest] 251 - 08/07/2025, 4:20:05 PM LOG 🚀 Backend is running on: http://localhost:3000 postiz | 2|backend | [ postiz | 2|backend | 'user.info.basic', postiz | 2|backend | 'video.publish', postiz | 2|backend | 'video.upload', postiz | 2|backend | 'user.info.profile' postiz | 2|backend | ] undefined postiz | 2|backend | node:internal/process/promises:389 postiz | 2|backend | new UnhandledPromiseRejection(reason); postiz | 2|backend | ^ postiz | 2|backend | UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "#<NotEnoughScopes>". postiz | 2|backend | at throwUnhandledRejectionsMode (node:internal/process/promises:389:7) postiz | 2|backend | at processPromiseRejections (node:internal/process/promises:470:17) postiz | 2|backend | at process.processTicksAndRejections (node:internal/process/task_queues:96:32) { postiz | 2|backend | code: 'ERR_UNHANDLED_REJECTION' postiz | 2|backend | } postiz | 2|backend | Node.js v20.18.1 postiz | 2|backend |  ELIFECYCLE  Command failed with exit code 1. postiz | 2|backend |  WARN  Local package.json exists, but node_modules missing, did you mean to install? postiz | PM2 | App [backend:2] exited with code [1] via signal [SIGINT] postiz | PM2 | App [backend:2] starting in -fork mode- postiz | PM2 | App [backend:2] online postiz | 2|backend | > [email protected] start /app/apps/backend postiz | 2|backend | > dotenv -e ../../.env -- node ./dist/apps/backend/src/main.js
I was having this problem and managed to resolve it by a) restarting the docker properly (deleting the container) when doing changes b) creating a company page rather than using the generic developer company. c) verifying the company page d) authorising my profile for the company e) requesting product "advertising api"
The error persists on my end. Any updates?
Seems no fix till now
Ok I tried adding the LinkedIn channel again, and this time it worked. I didn't make any changes.
Ok I tried adding the LinkedIn channel again, and this time it worked. I didn't make any changes.
I thought this was a Meta (ie facebook/insta) specific bug?
I tried adding the LinkedIn channel again. I am getting same error. "Could not add provider." Instagram, Facebook, X are OK, but Linkedin and Linkedin page are not working. Then I tested API infos with n8n, all of them are working very well in n8n, but Linkedin not connecting in postiz. I am using latest version. And I tried v1.56.0 to check the issue, I got same error message with latest and v1.56.0 versions. Latest version: https://github.com/gitroomhq/postiz-app/pkgs/container/postiz-app/483053848?tag=v2.5.3
postiz_app | 2|backend | AxiosError: Request failed with status code 403 postiz_app | 2|backend | at settle (/app/node_modules/axios/dist/node/axios.cjs:2053:12) postiz_app | 2|backend | at Unzip.handleStreamEnd (/app/node_modules/axios/dist/node/axios.cjs:3170:11) postiz_app | 2|backend | at Unzip.emit (node:events:530:35) postiz_app | 2|backend | at endReadableNT (node:internal/streams/readable:1698:12) postiz_app | 2|backend | at process.processTicksAndRejections (node:internal/process/task_queues:82:21) postiz_app | 2|backend | at Axios.request (/app/node_modules/axios/dist/node/axios.cjs:4280:41) postiz_app | 2|backend | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) postiz_app | 2|backend | at async LocalStorage.uploadSimple (/app/apps/backend/dist/libraries/nestjs-libraries/src/upload/local.storage.js:14:27) postiz_app | 2|backend | at async IntegrationService.createOrUpdateIntegration (/app/apps/backend/dist/libraries/nestjs-libraries/src/database/prisma/integrations/integration.service.js:54:19)
@nevo-david Hello David, how can I add Linkedin and Linkedin page manually, using sql tables etc. in Postiz. I neen to add immediatly. Could you share a guide to add Linkedin and Linkedin page manually, please. Secound question is how can I add 2nd X or 2nd Linkedin profiles' API keys in .env file for our other company? (We are using self hosted Postiz)
Adding channel, Redirecting You Could not add provider. You are being redirected back
I have the same issue considering linkedIn. AxiosError requested failed with status code 403
Okay so I fixed it for me.
The 403 error occured in my case, because somehow the image could not be uploaded. So the thing I did is, to go to the integrationService and comment out the image upload.
@nevo-david Hello David, how can I add Linkedin and Linkedin page manually, using sql tables etc. in Postiz. I neen to add immediatly. Could you share a guide to add Linkedin and Linkedin page manually, please. Secound question is how can I add 2nd X or 2nd Linkedin profiles' API keys in .env file for our other company? (We are using self hosted Postiz)
The 403 error occured in my case, because somehow the image could not be uploaded. So the thing I did is, to go to the integrationService and comment out the image upload.
@IJustDev Hi Alexander, could you please share the details immediatly. I want to fix it. How can I fix it? "So the thing I did is, to go to the integrationService and comment out the image upload." Could please a guide to solve the problem please.
I will attach a patch soon with a detailed desc.
The patch:
diff --git a/libraries/nestjs-libraries/src/database/prisma/integrations/integration.service.ts b/libraries/nestjs-libraries/src/database/prisma/integrations/integration.service.ts
index a54758e6..4043a99d 100644
--- a/libraries/nestjs-libraries/src/database/prisma/integrations/integration.service.ts
+++ b/libraries/nestjs-libraries/src/database/prisma/integrations/integration.service.ts
@@ -106,7 +106,11 @@ export class IntegrationService {
const uploadedPicture = picture
? picture?.indexOf('imagedelivery.net') > -1
? picture
- : await this.storage.uploadSimple(picture)
+ : await this.storage.uploadSimple(picture).catch((err) => {
+ console.error("Uploading the integrations image failed.");
+ console.error(err);
+ return undefined;
+ })
: undefined;
return this._integrationRepository.createOrUpdateIntegration(
Docker compose file changes:
services:
postiz:
build:
dockerfile: Dockerfile.dev
context: ./postiz-app
# image: ghcr.io/gitroomhq/postiz-app:latest
Context: I have a folder containing the docker-compose.yml file and the cloned source code in ./postiz-app
@neekersen
Thank you so much @IJustDev
Unfortunately, I also have this error, fresh installation. Every time I try to add a service, I see this in the logs:
Unfortunately, I also have this error, fresh installation. Every time I try to add a service, I see this in the logs:
![]()
Try the fix I proposed for now. It looks like the same issue
The patch:
diff --git a/libraries/nestjs-libraries/src/database/prisma/integrations/integration.service.ts b/libraries/nestjs-libraries/src/database/prisma/integrations/integration.service.ts index a54758e6..4043a99d 100644 --- a/libraries/nestjs-libraries/src/database/prisma/integrations/integration.service.ts +++ b/libraries/nestjs-libraries/src/database/prisma/integrations/integration.service.ts @@ -106,7 +106,11 @@ export class IntegrationService { const uploadedPicture = picture ? picture?.indexOf('imagedelivery.net') > -1 ? picture - : await this.storage.uploadSimple(picture) + : await this.storage.uploadSimple(picture).catch((err) => { + console.error("Uploading the integrations image failed."); + console.error(err); + return undefined; + }) : undefined; return this._integrationRepository.createOrUpdateIntegration(Docker compose file changes:
services: postiz: build: dockerfile: Dockerfile.dev context: ./postiz-app # image: ghcr.io/gitroomhq/postiz-app:latestContext: I have a folder containing the
docker-compose.ymlfile and the cloned source code in./postiz-app
I fixed using your fix codes. It's working, thanks a lot. I connected the Linkedin accounts in postiz after the fix.
I applied with this method.
I created a file, is named "Dockerfile.postiz"
FROM ghcr.io/gitroomhq/postiz-app:latest
USER root
RUN sed -i 's|: await this.storage.uploadSimple(picture)|: await this.storage.uploadSimple(picture).catch((err) => { console.error("Uploading the integrations image failed."); console.error(err); return undefined; })|g' \
/app/apps/backend/dist/libraries/nestjs-libraries/src/database/prisma/integrations/integration.service.js
I modified docker-compose.yml file like this:
postiz:
build:
context: .
dockerfile: Dockerfile.postiz
image: postiz-custom
# image: ghcr.io/gitroomhq/postiz-app:latest
It seems no one on the dev team has looked at this thread yet. We really need a permanent fix so we can pull a new image as updates are released, especially security and stability patches. Rebuilding custom images with a local patch works for now, but it will become a maintenance nightmare as updates get more frequent. We need upstream fix.
I have the similar issue with the Telegram.
i have the exact same issue with instagram stnadalone
I have the same problem with LinkedIn and nothing seems to work. Please, this needs an urgent solution. Does anyone know how to fix it from the yaml?