question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Adding a new product throws write_products scope exception

See original GitHub issue
Project: ASP.NET MVC .NET Core
Library Version: 5.3.0

I started off by creating a public app on here https://partners.shopify.com And then I set everything up, I managed to generate the access token etc.

And now I’m trying to add a new product but I keep getting this exception This action requires merchant approval for write_products scope

And I’m not sure why, could someone clear this up for me?

var service = new ProductService(usersMyShopifyUrl, accessToken);

var product = new Product()
{
    Title = "Test Product Walter",
    Vendor = "Burton",
    BodyHtml = "<strong>Good snowboard!</strong>",
    ProductType = "Snowboard",
    Images = new List<ProductImage>
    {
        new ProductImage
        {
            Attachment = "R0lGODlhAQABAIAAAAAAAAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw=="
        }
    },
};


product = await service.CreateAsync(product);
product = await service.CreateAsync(product, new ProductCreateOptions() { Published = false });

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
nozzlegearcommented, Jul 22, 2020

What you have there should work, but you’re only asking for permission to read and write customers. If you want to read and write products, you’ll need to add those permissions to your scopes list too!

0reactions
PtrStructcommented, Jul 22, 2020

Oh! I see now! I’ll try that as soon as I get back from work, thank you! 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

2.3 Scope exceptions to the VIE model
1 VIE scope exception — not-for-profit organizations. This scope exception applies to all reporting entities subject to the consolidation ...
Read more >
What is not working? - java help on CodeGym
When the program is started with the arguments "-u id productName price quantity", the product information in the file should be updated.
Read more >
Maple 7 Programming Guide
Use these new relations to write a recursive Maple procedure which ... Since '&^' is a neutral operator, you can write products of...
Read more >
Chapter 1. Introducing Spring Batch - liveBook · Manning
The system will process data every night to insert new products in the catalog ... The scope of this new default namespace is...
Read more >
liangwu - On the way to be great…
A module limits scope so the variables you create in the module only live ... The returned object literal will be added to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found