Hi,
I’m trying to setup an OAuth2 credential with Strava API. When trying to connect, the redirection to Strava works, but the callback fails with the error message:
code: 0
message: "HTTP status 400"
hint: ""
Some details about my setup:
- I’m using n8n 0.152.0
- My config (based on the Server install docs with docker-compose running in a VPS):
(I’m skipping traefik config for brevity)
n8n:
image: n8nio/n8n
restart: always
ports:
- "127.0.0.1:5678:5678"
labels:
- traefik.enable=true
- traefik.http.routers.n8n.rule=Host(`${SUBDOMAIN}.${DOMAIN_NAME}`)
- traefik.http.routers.n8n.tls=true
- traefik.http.routers.n8n.entrypoints=web,websecure
- traefik.http.routers.n8n.tls.certresolver=mytlschallenge
- traefik.http.middlewares.n8n.headers.SSLRedirect=true
- traefik.http.middlewares.n8n.headers.STSSeconds=315360000
- traefik.http.middlewares.n8n.headers.browserXSSFilter=true
- traefik.http.middlewares.n8n.headers.contentTypeNosniff=true
- traefik.http.middlewares.n8n.headers.forceSTSHeader=true
- traefik.http.middlewares.n8n.headers.SSLHost=${DOMAIN_NAME}
- traefik.http.middlewares.n8n.headers.STSIncludeSubdomains=true
- traefik.http.middlewares.n8n.headers.STSPreload=true
environment:
- N8N_BASIC_AUTH_ACTIVE=true
- N8N_BASIC_AUTH_USER
- N8N_BASIC_AUTH_PASSWORD
- N8N_HOST=${SUBDOMAIN}.${DOMAIN_NAME}
- N8N_PORT=5678
- N8N_PROTOCOL=https
- N8N_DIAGNOSTICS_ENABLED
- EXECUTIONS_DATA_PRUNE
- EXECUTIONS_DATA_MAX_AGE
- WORKFLOWS_DEFAULT_NAME
- NODE_ENV=production
- WEBHOOK_URL=https://${SUBDOMAIN}.${DOMAIN_NAME}/
- GENERIC_TIMEZONE=${GENERIC_TIMEZONE}
- TZ=${GENERIC_TIMEZONE}
volumes:
- ${DATA_FOLDER}/.n8n:/home/node/.n8n
- /home/deploy/app/n8n/local-files:/files
The Strava API parameters are correct, here’s a screenshot of my setup:
Also the callback is properly set in Strava API settings (only the domain).
I also tested this setup on n8n.cloud and got “Something went wrong”
Anything I can do to make it work?
Thanks for your help