Shopify / shopify-api-ruby

ShopifyAPI is a lightweight gem for accessing the Shopify admin REST and GraphQL web services.
MIT License
1.06k stars 469 forks source link

Trying to save an asset using the Shopify AP #1297

Closed Gopinath-M closed 7 months ago

Gopinath-M commented 7 months ago

shopify_api - 13.4 api_version - 2023-10

I'm encountering an issue while trying to save an asset using the Shopify API. Here's the code snippet I'm using:

asset.theme_id = 135230488633 asset.key = "templates/index.liquid" asset.value = "

We are busy updating the store for you and will be back within the hour.

" asset.save!

However, I'm getting the following error message:

{"errors":"Not Found","error_reference":"If you report this error, please include this id: 7ccccd56-b80f-425b-9a08-5df2e125ba8b-1711595619."}

Screenshot from 2024-03-28 08-47-06

Could you please help me understand why this error is occurring and how I can fix it?

sle-c commented 7 months ago

Hi @Gopinath-M , this is most likely because your app doesn't have the required access scope. Starting from 2023-04, your app needs to request the write_themes scope from Shopify. Here are more information about this requirement. I'll close this issue because this is not related to the library.