Dev Dashboard custom app — connection timeout when requesting access token from Docker container
Hi everyone,
I’m building a Python-based inventory sync tool that runs inside a Docker container and connects to my Shopify store via the Admin REST API. I’ve migrated from a legacy custom app to the new Dev Dashboard flow (client credentials grant) and I’m stuck on a connection timeout.
My setup:
- Created a custom app in the Dev Dashboard (dev.shopify.com/dashboard)
- Configured a version with scopes:
read_products,write_products,read_inventory,write_inventory - App URL set to
https://shopify.dev/apps/default-app-home(app is server-side only, not embedded) - Released the version and installed the app on my store
- Copied the Client ID and Client secret from Settings
What I’m doing:
My Python app uses httpx to POST to the token endpoint:
POST https://{my-store}.myshopify.com/admin/oauth/access_token
Content-Type: application/x-www-form-urlencoded
grant_type=client_credentials
client_id={my_client_id}
client_secret={my_client_secret}
This follows the docs here: Using the client credentials grant
What happens:
When I run this from inside a Docker container (docker compose run --rm sync --test-shopify), I get a connection timeout — it never reaches Shopify at all. No 401, no 403, just a timeout.
The app is built on:
- Python 3.11-slim Docker image
httpxHTTP client library- Docker Compose with default networking
- macOS host with Docker Desktop
What I’ve verified:
- The app is installed on my store (confirmed in Dev Dashboard → Home → Installs)
- Client ID and Client secret are correct (copy-pasted from Dev Dashboard → Settings)
- The store URL is correct (
{my-store}.myshopify.com) - Version was released with all 4 scopes
.envfile is loaded correctly inside the container (validated via--validatecommand)
What I haven’t tried yet:
- Running the same Python script outside Docker (directly on my Mac) to isolate whether it’s a Docker networking issue vs. a Shopify/auth issue
- Testing with
curlfrom inside the container to see if it can reachmyshopify.comat all
My questions:
- Is there anything specific about the Dev Dashboard client credentials flow that could cause a connection timeout (vs. a 401/403)? For example, does Shopify block requests from certain IP ranges or Docker container user agents?
- For those running server-side integrations with the new Dev Dashboard apps — are you able to make the token request from a Docker container successfully?
- Is there anything I might be missing in the Dev Dashboard setup that would prevent the token endpoint from responding?
Any help is appreciated. Happy to share more details about my Docker or network config if that helps narrow things down.
Thanks!