App Bridge Error: INVALID_CONFIG: Not A Valid Host, Please Use The Value Provided By Shopify

Hello nice supporters!

I tried searching high and low for a solution but couldn’t find one. There is another thread on the same topic but that solution didn’t work for me either!

So here is my code and error which App Bridge returns (see attached screenshots)

https://goshoplocal.com/vendor.php?dispatch=mc__shopify_connector_vendors.install_app&hmac=2794094bfdfba1b6db84f44f35adbd5f7590fbaedc284157e752a7cfbdc460ff&host=bWF4aS1jYXJ0LXRlc3QxLm15c2hvcGlmeS5jb20vYWRtaW4&shop=maxi-cart-test1.myshopify.com&timestamp=1659611574

I also added request which was sent by Shopify. Host is encoded in request and it is definetely maxi-cart-test1.myshopify.com/admin

So I don’t really understand what this error is about.

Hello,

Thanks for reaching out. The issue you’re seeing is because you’ve hardcoded the host value. Per our documentation for Retrieve the host:

“The host is provided as a URL query parameter appended to your application URL when your app is loaded inside the Shopify admin. The host parameter is an encoded version of the shop origin”

Rather than hardcoding the value, try retrieving it from the URL. Hope this helps!

1 Like

A couple things:

  1. It’d be helpful to understand how you get to this page in the first place. Is this after installing the app? Is this the auth callback?
  2. Looks like you’re passing a Shopify Admin url as a host, you might be able to understand the host parameter better here.