Solved

How can I resolve connection verification issue with my developed app on Shopify Flow?

schokola
Shopify Partner
4 0 2

Hi!

 

I have just created an app. It is used only for one specific store (Shopify basic) via custom distribution link. 

 

Now everything looks good on Admin and Storefront side. Only thing that is left to do, is to run something when the order is placed. The task itself is very simple. It just add a unique ID to each line items in the order. 

 

In order to do so, I created a route as a API and let Shopify Flow call it using "Send HTTP request". I've been calling app API from storefront using App Proxy found in App setup in Shopify Partners. So I thought this would be straighforwarded. 

 

I was wrong. Shopify flow can't access the app's API when I send HTTP request to 'https://admin.shoify.com/store/<store name>/<Subpath prefix>/<Subpath>/<route name>' It says "Verifying your connection...: Your connection needs to be verfified before you can proceed"

 

I don't know what I'm doing wrong? 

When I access from the storefront, I access to the API via 'https://<store name>.myshopify.com/<Subpath prefix>/<Subpath>/<route name>' and it always works fine including auth. But that didn't work, so I tried different path name as indicated here

 

I also can't include X-Shopify-Access-Token since it is not custom App (unless there is a way)

 

Thank you!

Accepted Solution (1)

ClementOutis
Shopify Partner
24 4 9

This is an accepted solution.

Hi @schokola ,

 

I'm not familiar with Shopify Flow but I can suggest you to use the webhook order create (or paid) instead.

With this webhook, every time an order is created, Shopify will sends all the information to the URL you specify.

 

Another thing is that for me, the app proxy is only for the call to the app from the Shopify store (like JS call).

 

Regards,

Clément.

- Helpful? Like and Accept a solution
- Casper - Cart, sync and keep saved for a month your customer's cart across multiple device seamlessly.
- BrandCraft, give you all the keys to edit your checkout page, only for Shopify Plus with the Checkout Extensibility.

View solution in original post

Replies 4 (4)

ClementOutis
Shopify Partner
24 4 9

This is an accepted solution.

Hi @schokola ,

 

I'm not familiar with Shopify Flow but I can suggest you to use the webhook order create (or paid) instead.

With this webhook, every time an order is created, Shopify will sends all the information to the URL you specify.

 

Another thing is that for me, the app proxy is only for the call to the app from the Shopify store (like JS call).

 

Regards,

Clément.

- Helpful? Like and Accept a solution
- Casper - Cart, sync and keep saved for a month your customer's cart across multiple device seamlessly.
- BrandCraft, give you all the keys to edit your checkout page, only for Shopify Plus with the Checkout Extensibility.
schokola
Shopify Partner
4 0 2

Hi @ClementOutis 

 

Thanks for the tip! It turns out that Shopify Flow doesn't contain proper headers (at least from how I see from the request) to be forwarded by proxy. So I sent the request directly to the server and handle the auth there. 

I went with your webhook path, AND created Shopify Flow to verify in case webhook fails. 

ClementOutis
Shopify Partner
24 4 9

HI @schokola ,

 

Great, glad that helped 😊.

 

For information, if the webhook call from Shopify do not get a 200 response quickly, it will considered that the call failed and it will be retry in a moment.

It seems to me that a webhook is retry 19 times over 48 hours. He all the try failed, the webhook hook will be removed.

 

Regards,

Clement.

- Helpful? Like and Accept a solution
- Casper - Cart, sync and keep saved for a month your customer's cart across multiple device seamlessly.
- BrandCraft, give you all the keys to edit your checkout page, only for Shopify Plus with the Checkout Extensibility.

Samia_Akram22
Shopify Partner
60 10 14

@schokola 

Hey! It seems like you're facing an issue with Shopify Flow accessing your app's API. The error suggests a verification problem. Ensure the URL you're using for the API request in Shopify Flow is correct.

Try this format: `https://<store name>.myshopify.com/<Subpath prefix>/<Subpath>/<route name>`

Also, check if your API route is configured to handle the verification step. If the issue persists, double-check the authentication process and make sure the necessary permissions are set up for Shopify Flow to access your app's API. If applicable, ensure your custom distribution link is properly configured for this purpose. Good luck!

Problem Solved? ✔Accept and Like solutions to help future merchants.