Multistore app Installation

Topic summary

A developer built a Shopify app using a React.js-Node.js template and successfully deployed it to Digital Ocean with a hardcoded API key in the environment file for their initial partner account store.

Current Issue:

  • Attempting to install the same app on a different partner account’s store
  • Receiving an “INVALID_CONFIG ERROR” indicating the provided API key is incorrect
  • The app cannot authenticate because it’s still using the original hardcoded API key

Core Question:
How to dynamically set the SHOPIFY_API_KEY based on which store the app is being installed on, rather than relying on a single hardcoded value in the environment configuration.

This appears to be a multi-tenant architecture challenge where the app needs to support installation across multiple partner accounts with different API credentials.

Summarized with AI on November 3. AI used: claude-sonnet-4-5-20250929.

I have made a shopify app by using reactjs-nodejs shopify app template and install app on the store of partner account with key 60180045ab8144691e160******** which is hardcoded on env file and it is deploy on digital ocean, now I have install app on the store of different partner account, with api key 3b5cdc219abd41355824a******, How can I set SHOPIFY_API_KEY dynamically for the store on which app gets installed, because appBridgeProvider used api-key for authenticate the app

Error : - APP::ERROR::INVALID_CONFIG: Provided apiKey 3b5cdc219abd41355824ad******* is incorrect. Expecting 60180045ab8144691e1609a********