Cover Image for Shopify stagedUploadsCreate resource valid values

Shopify stagedUploadsCreate resource valid values

TLDR;

When using the stagedUploadsCreate mutation to upload an image to a Shopify store, the resource enum must be given IMAGE as the value.

The SHOP_IMAGE option value results in an error: RequestError: Access denied for stagedUploadsCreate field..

Error

I was working on a feature that required using the stagedUploadsCreate mutation to upload an image to a Shopify store. The documentation for the mutation can be found here: stagedUploadsCreate.

There are two option values which were appropriate for the type of file that I was uploading: IMAGE and SHOP_IMAGE. I tried using SHOP_IMAGE and received the following error: RequestError: Access denied for stagedUploadsCreate field..

Due to the error message, I assumed that I did not have the correct permissions to upload successfully. I spent a lot of time changing the permissions and trying to figure out what was wrong with my request. After granting all the permissions that I could think of, I still received the same error.

Then I tried using IMAGE as the value for the resource enum and the request was successful.