Custom (Embedded) OR Private App For API Project

Solved
marc-sternen
Tourist
4 0 0

Hi,

I have a question regarding the general purpose of private and custom (embedded) Shopify apps.

I'm interested in building an app that would synchronize my store's inventory, purchases, shipping, and refunds, etc. with another provider via a REST API. I will need to register Shopify webhooks, set up cron jobs, and have the option to make API routes publicly available.

My question is the following. Which would be more suitable for such a project, a custom or a private app, or even a combination of both? 

From my current understanding based on what I was able to gather via the docs here & here, it seems that custom apps are used to extend a Shopify shop, likely via a UI. Whereas private apps are more likely what I'm after as they seem to be used to handle data vs. extending a store with custom functionality. 

In addition, I often see the word "embedded" in combination with "custom apps". Is there such a thing as a custom app that isn't embedded? If so, what would be its purpose and how would it be integrated? 

Thanks in advance

0 Likes
Crayons
Excursionist
11 1 9

This is an accepted solution.




@marc-sternen wrote:

I have a question regarding the general purpose of private and custom (embedded) Shopify apps.


"Embedding" your app within the Shopify Admin, means shop owners access your app directly through their Shopify portal. An embedded app has a user interface.



A private app is really nothing more than an API key and a set of permissions (that you define). With this API key, you can access either the Shopify Admin or Shopify Storefront APIs, from anywhere and using any application or code you like.


@marc-sternen wrote:

I'm interested in building an app that would synchronize my store's inventory, purchases, shipping, and refunds, etc. with another provider via a REST API. I will need to register Shopify webhooks, set up cron jobs, and have the option to make API routes publicly available. My question is the following. Which would be more suitable for such a project, a custom or a private app, or even a combination of both?


If you wish to expose endpoints publicly, you won't be able to do that through an embedded app. It sounds like you want to build your own API, and use your private app key to connect to your store using the Shopify Admin APIs. You can create endpoints within your API to receive Shopify webhooks. You can setup webhooks under the Notifications area of your store's settings. There are many webhook events you can subscribe to.


@marc-sternen wrote:

In addition, I often see the word "embedded" in combination with "custom apps". Is there such a thing as a custom app that isn't embedded? If so, what would be its purpose and how would it be integrated?


All apps whether "embedded" or "private", are custom apps, in the sense that you've created them yourself. I suppose a "custom app that isn't embedded", is simply just a private app in the sense that private apps are not embedded apps.

marc-sternen
Tourist
4 0 0

Thank you for your response, it all makes sense. Are you able to clarify in a bit more detail why API endpoints within an embedded app can not be made publicly available? The reason I'm asking because I'm still interested in understanding the concept better and I'm a bit confused about this limitation as the app would ultimately be self-hosted. Thanks

0 Likes
marc-sternen
Tourist
4 0 0

Also, I have posted other questions specifically around custom (embedded) apps here in the forum if anyone is interested in further clarifying the concept.

0 Likes
Crayons
Excursionist
11 1 9

@marc-sternen wrote:

Thank you for your response, it all makes sense. Are you able to clarify in a bit more detail why API endpoints within an embedded app can not be made publicly available? The reason I'm asking because I'm still interested in understanding the concept better and I'm a bit confused about this limitation as the app would ultimately be self-hosted. Thanks


That's simply not what an embedded app is meant to be. In order to gain access to an embedded app, a user needs to pass through Shopify's authentication, which inherently means its not public. Moreover, embedded apps are not designed to be a host for your public APIs -- there's no way to resolve an address directly to your "embedded app API", let alone configure it.