Forum Academy Marketplace Showcase Pricing Features

Make a GET request to a bubble page - Shopify OAuth

I’m currently exploring creating a Shopify app using bubble. I’ve been able to manually set up the OAuth and install my ‘app’ on a test Shopify store (this was one of those ‘I can’t believe I just did that’ moments).

My next step is to try and see if I can set up the OAuth flow properly, as if a new merchant has just installed my app for the first time. See Shopify’s dev docs for how this is supposed to be done.

The problem I’m facing is that when a merchant clicks the ‘install’ button on the Shopify app store, a GET request is sent to the app url path, which I have set as the index page of my app (and it needs to be the index url for the rest of my app to work).

I believe bubble pages are able to accept GET requests (see this thread), but I don’t think you’d be able to trigger a workflow off the back of it. Without changing the app path url to an API endpoint, would there be another solution?

I’m not sure this is possible in bubble at the moment, but I hope someone has an answer!

Hi there @adamjdavies10,

Have you taken a look at the Bubble API Connector?

Hi @johnny

I have used the API connector to make a variety of calls already in the OAuth flow. My question is how would I be able to trigger a workflow etc if a GET request is called on a bubble page (e.g. index) and not on an API endpoint that I expose.

Thanks,
Adam

If you’re using a GET request via Shopify’s API, you can use the data grabbed from that GET request as data in Bubble. On the other hand, if you’re wanting to trigger a WF action when you do something in Shopify, you might look to see if Shopify has anything that can send a webhook to Bubble-- you can use backend workflows for that.

I’m not too familiar with Shopify’s API, but that’s how it generally works with APIs.

Hi @johnny

I’ve not used the OAuth2 User-Agent Flow Authetication on the API Connector yet. Do you think I should give this a go first? The current flow I have set up is using multiple work flows for setting up the OAuth.

Thanks,
Adam

Oh. So you’re setting up oauth right now?

I’m not too familiar with Shopify’s oauth setup since I don’t use Shopify’s API, but I think @jamesdevonport may be able to help out because UserLoop is specifically for Shopify.

Hi @johnny

Yep. I managed to get it working manually, but I want to automate it when my app receives the GET request that Shopify sends once a merchant clicks ‘install’ on the Shopify app store.

Just to be clear, this is the GET request I am referring to in the OAuth setup for Shopify:

After a merchant clicks the link to install your app, your app receives a GET request on the app URL path that you specified in the Partner Dashboard. Requests to this URL path from a merchant who is logged into the Shopify App Store include the shop , timestamp , and hmac query parameters.

Here are the Shopify docs for reference - click here

Thanks,
Adam

No problem. Thanks for the help so far.

@jamesdevonport any guidance you can share on this?

Thanks,
Adam

Hello,

I’ve moved this question over to a new thread which better explains the problem I’m facing.

@jamesdevonport would be great to hear how you’ve managed to work out the OAuth process for UserLoops. Was checking out your app store page earlier. Looks like a great product!

Thanks,
Adam

Hey Adam,

Authorization was definitely the most tricky thing to set up with the Shopify API, particularly covering edge cases like users with the same email address + multiple stores etc, which Shopify require you support in order to get approved on the store.

Happy to chat and show my setup if that helps :slight_smile:

James

Hey @jamesdevonport

That you would be great, thank you. I’ve just shot you a message.

Thanks,
Adam

@adamjdavies10

Hi there,
I have this same issue. Could you spare a few moments and help me out with this?
In case you have discord :
notA#0926
Please send me a DM