Upload Video using Graph QL

Topic summary

Main issue: Uploading a video via Shopify’s GraphQL led to Google Cloud “AccessDenied” errors and, later, “Invalid video URL” when attaching the video to a product with productCreateMedia.

What was tried:

  • Used stagedUploadsCreate with resources FILE and VIDEO; different parameter sets, same failure.
  • Successfully uploaded to Google Storage via cURL and created a file with fileCreate, but productCreateMedia still returned “Invalid video URL.”
  • Tested multiple URLs for originalSource: stagedUploads resourceUrl, Google upload response URL, and Shopify Files link; none worked. Setting mediaContentType=IMAGE attached but failed processing, confirming the URL was reachable but type handling was wrong.

Working solution (from Shopify support test):

Outcome: The user confirmed it works after following the above steps. Resolution achieved. Key takeaway: use the video-production-core-originals resourceUrl from stagedUploadsCreate, not the staged-uploads tmp path or Files URL.

Summarized with AI on January 2. AI used: gpt-5.

UPDATE: I managed to upload the file to Google Storage with CURL. Then I was able to create the video file using the resourceURL on the fileCreate mutation. However, I cannot add that video to the product. Accordingly to the documentation I must use the resourceUrl as the originalSource of the productCreateMedia mutation but I always get Invalid video url.

Does anyone know what is going on? Anyone faced the same situation and has able to figure it out?