What is the Shopify Public App Install Flow? - shopify

So I've been building a Shopify App.
Currently I've gotten to the point where I get the permanent access code.
My question lies with the flow of installation.
Currently the store owner would create an account on my website, then click a button to install our shopify app.
taken to shopify app install prompt -> clicks install -> redirects to my site where I exchange code for access code.
This works fine. But where I am having trouble is what if once my app is on the Shopify Store.
A store installs it from shopify directly (meaning they don't have an existing account with me) I then have no account to save the data to.
How do I go about this?
I looked at other apps on the store. Some apps like Shippo can take you straight to their site first to create an account and then install their app.
What's the solution?

You misunderstand the install from Shopify. When someone installs from Shopify, they come knocking on your door. They introduce themselves as being ***.myshopify.com. Once they approve your App and accept your terms of service, you get to confirm their account, and hence you persist their data in your database exactly the same as someone that installed your App outside Shopify.
So when you say you no account to save the data to, well of course. They are a new install. So make a new record. Instead of an update, you to a create.

Related

command shopify theme serve show error when i'm the owner

i try to use command shopify theme serve in my project. My account is owner and i also create a staff account with all sensitive permissions. But the terminal always return You can't use Shopify CLI with development stores if you only have Partner staff member access. If you want to use Shopify CLI to work on a development store, then you should be the store owner or create a staff account on the store. . How i can fix this
I've had a plethora of issues with Shopify CLI, so I can help here. This has happened when I have been logged in for a while. I will need more information, but will provide a few catch-all solutions.
1.Are you using a developer account, or are you logged into a store? Try logging out and logging in again as the owner account.
What version are you using?
shopify version
Have you tried logging out and logging back into your store? This usually rectifies it.
shopify logout
shopify login --store=[your .myshopifyURL]
Are you using ruby or homebrew? I have found ruby to be much more stable, and it allows to switch between Shopify CLI versions.
Try switching to a previous shopify version 2.20 or 2.19 if you continue seeing issues. Again, this will need to be done with ruby, as homebrew does not allow any version backtracking.
Edit: make sure your login command looks like this:
shopify login --store=verizon.myshopify.com
You can paste this link from shopify admin, as it is the same link.

can people Install my public undistributed shopify app via external link?

I am having trouble testing installing a public undistributed shopify app I made with a shop,
once I click the link I am able to see the app and the required scopes, but the install app button is disabled and no error message is displayed or any indication of why so.
I am following this link and I have made the first step, skipped the second and stuck when the third one didn't yield the intended result.
also if someone can explain the use of development store and why its required for such a process, that would be very useful.

Shopify Public App - How To Get Key, Token & Url

I am totally new to Shopify Public App development and I will need your help to understand it a bit better.
For a client, I need to build a Shopify Public App that will be used by several Merchants.
This application will have to access the Merchants' store via the Admin API.
If my understanding is correct, in order to access one specific Merchant's store via the Admin API, I need to have 3 pieces of information from that Merchant's store: the Public API Key, Token and URL.
Now, my question:
When the Shopify Public App is installed by a Merchant, how does my app get these 3 pieces of information (specific to that particular merchant) ?
Is there any "magic" trick? Does the Merchant need to input this info? ...
In advance, many thanks for your help
Each merchant will need to install your app. In the installation phase shopify will pass, as an argument, the access token, that is a token that you will need, to use the Admin API.
If we're talking about an embedded app is expected that every request made is authenticated.
Depending on which kind of app you want to create (embedded or not) and language you may want to use, using the Shopify Cli to create the first draft of the app is really reccommended. It will create the base to have an installable app. Here is the documentation https://shopify.dev/apps/getting-started/create
You need to install the Shopify Cli and then run
shopify app create (node | ruby | php)
depending on your language of choice.
For those who might be interested, I finally found the link to the information.
Shopify - Getting started with OAuth

Can not alter/add data on shopify paid plan store by unlisted public app

I am facing some weird issue in Shopify app development. I have created app which is working fine on Development store. it is able to add some data on development store.
But for testing purpose I have offered this app to the merchants to test this app on their live store having activated Shopify Paid plan. But app can not add any data. Post/Put requests are auto converted to Get requests.
I have created couple of apps those are published on App store and in past they were being used by Active Paid Plan merchants before app has been published without any issue.
Is there something changed on Shopify side. or I am missing something this time ?
Any help will be appreciated.
every put/post request's endpoint should be on .myshopify version of domain.
I was passing primary domain. and it was working fine in dev stores as dev store. because in dev stores .myshopify version domain and primary domains are same.
I did not get this issue for so long. it was a silly mistake but stops app functionality.
Posting answer just because other people would not make such a blunder.

Change Authorize URL in Shopify for a Existing App

I am in the process of updating my Shopify App with new Permissions. This means there is a change in the authourize_url which would show up the permissions window when trying to install an app. I have also changed the redirect URL of the App. The App is currently listed in Shopify, and there are accounts using the App.
How would this change affect the current App Installs?
How do I go about this without having any downtime or manually asking Customers to uninstall and reinstall the App again?
What is the best way to handle such scenario?
You change the scopes. Your customers will therefore all have unauthorized oAuth tokens. The next time they try and use the App with the new scopes, your App will create a new oAuth token for their access as Shopify will prompt them to accept your new scopes.
It seems like pain, but it is the only way to go.