Getting "You are not authorized to use the CLI to develop in the provided store." error

I am attempting to pull down and edit my theme locally using the CLI and I’m getting this error - “You are not authorized to use the CLI to develop in the provided store.”

The command I’m trying to use is shopify theme dev and I’m using the latest version of the shopify CLI, node, etc.

The account I’m using to login is the store owner account so there should be no issue there. I’m seeing that some other people are running into this error as well. I tried reaching out to shopify support and they were absolutely no help whatsoever.

As a developer, I would love to be able to edit themes locally, and this is a huge hinderance to what i can accomplish. Thanks for any help!

2 Likes

Can you confirm if the error is triggered when you open the link in the browser and attempt to log in?

Absolutely - that is the exact flow:

Right after I click that button it gives me the error in the CLI.

1 Like

Can you run the command to logout from Shopify?

shopify auth logout

Indeed, just ran it and tried to connect and got the same problem as before. Thanks for your help and suggestions!

If your issue is not resolved try the command by changing the store name.

shopify login --store yourstore.myshopify.com

I don’t think the shopify login command exists in my newer version of the CLI - I wonder if I should try an older version?

Just tried installing an older version and that didn’t work as well… thanks again for all of your help! Is there any or requirements for being able to use the shopify CLI with a store? I am using the owner email address but I don’t see any settings specific for this on the site… Anyhow, thanks again.

Could you please confirm the user permission in the screenshot?

Setting → User and Permission → Click the Store owner name → App section

Looked at that and I see this -

I’ve been getting the same error over the last 24 hours as well.

Adding to the thread in hopes for a solution.

My access is the same as @scottlandes , only with 2 active authorizations.

I have also confirmed that the account trying to connect through the CLI is a staff account with all permission enabled.

1 Like

@scottlandes @TBanks Please use the Partner account credentials to log in.

So if I register the store owner email as a partner account it should work? Also quick note for the plan that I’m on I cannot add any additional staff and would have to upgrade. Maybe that has something to do with it? Thanks so much, will try it out.

Okay! I think I figured it out. It looks like you do indeed need to have a partner account set up - for this I just registered using the same email as my store owner email. After that I was able to start manipulating and managing themes from the CLI, yay!

The only other thing that I noticed is that the store id was different than the url slug that I registered for the store - so I used the --store=xxxxx-xxx format and then everything started working. Very happy to be able to use my local dev tools to work on themes :slight_smile:

Thanks for everyone’s help! If anyone else is having the same issue please try out my answer here as a solution.

1 Like

@scottlandes Can you please describe the steps to set up a “Partner account” and link it to your existing Shopify store(s)? Or what exactly you did to login again in the CLI.
Any idea why we now need a “Partner” account for it?
Thanks!

This has just started happening to us today. Except that I was literally logged in on the same machine, same connection, working on the same theme earlier on in the day. Now, two hours later it’s booted me out and I can’t get back in, I’m working from a partner login with a staff account on the dev store, and I’ve already been connected to and working with this store for more than a month. Why has it suddenly just stopped working? Logged in, logged out, checked account on the dev store, checked permissions, tried different connections (via vpn), nothing will reconnect me to the store I’ve been connected to for ages.

2 Likes

I’m having the same issues @Phil_Mells. Yesterday I Worked in my project, and today, Error on init shopify theme dev.

1 Like

Same error for me on shopify app dev, issue started today as well.

2 Likes

Yep, same for me…it started like 1 hour ago…now I cant even get my dev store to work…

2 Likes

I have same issue. I can not proceed “shopify app deploy”, “shopify app dev” command.
After logged in, cli says “invalid_target”.
I developed with cli until yesterday.

1 Like