Dev Dashboard custom app connection timeout when requesting access token from Docker container

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
  • httpx HTTP 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
  • .env file is loaded correctly inside the container (validated via --validate command)

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 curl from inside the container to see if it can reach myshopify.com at all

My questions:

  1. 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?
  2. 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?
  3. 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!

Hey @philip_ross - thanks for reaching out. Since this looks more like a Docker networking issue than a Shopify-specific one, I can’t dig too deep on our end, but wanted to share a couple of things I’ve seen help in similarsituations.

Two quick things to try first:

  1. Run the script directly on your Mac (outside Docker) with the same credentials. If it works, your app config is fine and the problem is most likely container-specific.
  2. Run curl from inside the container: docker compose run --rm sync curl -v https://{your-store}.myshopify.com.

If curl does fail inside the container, one thing that’s come up before with similar Docker issues on macOS for me personally is that Docker Desktop’s bridge networking can be weird with outbound HTTPS — worth looking into network mode settings in your docker-compose as a sanity check. I’m not a Docker expert, but that’s usually where I’d start.

Hope this helps a tiny bit. If you do notice that you’re receiving any Shopify specific errors in your testing though, just let me know and I’ll take a look.

1 Like