I’m building an app which needs to create image files on the store. And I want to request the write_images access scope, which is mentioned in fileCreate documentation.
But when declaring the optional scope in app TOML file:
[access_scopes]
optional_scopes = ["write_images"]
The toml does not pass the validation with the following error:
11:20:22 │ app-preview │ ❌ Error
11:20:22 │ app_access │ └ write_images, read_images
Moreover, the write_images access scope is not mentioned in the scopes documentation.
Is the write_images a valid scope or fileCreate documentation is outdated/incorrect?
Thanks!
Hey @Dmitri_Pavlutin,
Thanks for bringing this up. For the fileCreate mutation, you can also use write_files scope. Have you tested that to see if you get the same error?
I’ll look in to that write_images scope to see why that isn’t working when it’s listed for that mutation. Would you be able to share some context on the reason you’re using that scope instead of the write_files scope?
Hi @KyleG-Shopify ,
Thank you for checking into the issue.
For now I’m using write_files and it works as expected.
Because my app is only going to upload images to Files, I was thinking to use a more narrow scope write_images.
Thanks for your help.
Hi @Dmitri_Pavlutin
Thanks for flagging this - this is actually a bug with our documentation. The write_images access scope is not valid, please continue using write_files.
@Liam-Shopify
Thank you, Liam. Ok, let’s then make sure the documentation gets updated.