I’m getting Status 415 “Unsupported Media Type” errors on every storefront API GraphQL request I make. The Storefront API is enabled and I’ve double checked permissions and the storefront access token. Here are my request details:
Url:
‘https://erica-weiner.myshopify.com/api/2020-10/graphql’
Headers:
‘Content-Type’: ‘application/json’,
‘X-Shopify-Storefront-Access-Token’: ‘155fd2311f650f31692e97758ad40ddc’
Query:
query Collection($handle:String!) {
{
collectionByHandle(handle: $handle){
id
title
handle
}
}
}
Full error log:
Error: Request failed with status code 415
at e.exports (/Users/davidgross/Sites/erica-weiner/web/functions/shopify-collection-sync.js:6:1780)
at e.exports (/Users/davidgross/Sites/erica-weiner/web/functions/shopify-collection-sync.js:6:10819)
at IncomingMessage.