The Shopify API Error 406, commonly known as "Not Acceptable," is an HTTP status code that indicates your API request was rejected because the server cannot provide a response in a format that your application can accept. In the context of Shopify's REST API, this error typically occurs when there's a mismatch between the content type your application is requesting and what the Shopify server is configured to deliver. This is one of the more frustrating errors to troubleshoot because it often appears without much detail about what went wrong on the surface level.
When you encounter a 406 error from Shopify's API, it means your request reached the server successfully, but the server determined it couldn't fulfill the request in the way you specified. This is different from a 404 error (resource not found) or a 401 error (authentication failure). Instead, it's a negotiation problem between your client application and the Shopify API endpoint. The server is essentially saying: "I understand what you want, but I can't give it to you in the format you're asking for."
In 2026, as Shopify continues to evolve its API infrastructure, understanding and resolving the 406 error becomes even more critical for developers integrating with the platform. This error can halt your entire API integration workflow, preventing data synchronization, order processing, and other critical business operations that depend on seamless API communication.
Fixing the Shopify API Error 406 requires a systematic approach. Let's walk through the most effective solutions:
Step 1: Verify Your Accept Header
The first thing to check is your Accept header. This header tells the Shopify server what content type you can accept in the response. Make sure it's set to "application/json":
curl -X GET "https://your-store.myshopify.com/admin/api/2026-01/products.json" \
-H "Accept: application/json" \
-H "X-Shopify-Access-Token: your_access_token_here"
If you're using a programming language, here's how you'd set this in JavaScript with Node.js:
const fetch = require('node-fetch');
const options = {
method: 'GET',
headers: {
'Accept': 'application/json',
'X-Shopify-Access-Token': 'your_access_token_here',
'Content-Type': 'application/json'
}
};
fetch('https://your-store.myshopify.com/admin/api/2026-01/products.json', options)
.then(response => {
if (response.status === 406) {
console.log('406 Error - Check Accept and Content-Type headers');
}
return response.json();
})
.catch(error => console.error('Error:', error));
Step 2: Check Your Content-Type Header
For POST and PUT requests, ensure your Content-Type header is correctly set to "application/json":
curl -X POST "https://your-store.myshopify.com/admin/api/2026-01/products.json" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "X-Shopify-Access-Token: your_access_token_here" \
-d '{
"product": {
"title": "New Product",
"product_type": "Example Type",
"vendor": "Example Vendor"
}
}'
Step 3: Verify Your API Version
Ensure you're using a current API version supported by Shopify. In 2026, you should be using at least the 2025-01 version or later. Check your endpoint URL format:
// Correct format
https://your-store.myshopify.com/admin/api/2026-01/products.json
// Incorrect format (will cause errors)
https://your-store.myshopify.com/admin/api/2021-07/products.json
Step 4: Validate Your Request Body
If you're sending data, make sure it's properly formatted JSON and not in any other format. Here's a complete example:
const axios = require('axios');
const shopifyApi = axios.create({
baseURL: 'https://your-store.myshopify.com/admin/api/2026-01',
headers: {
'X-Shopify-Access-Token': 'your_access_token_here',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
});
const productData = {
product: {
title: 'New Product',
product_type: 'Merchandise',
vendor: 'Your Vendor Name',
status: 'active'
}
};
shopifyApi.post('/products.json', productData)
.then(response => {
console.log('Product created successfully:', response.data);
})
.catch(error => {
if (error.response?.status === 406) {
console.error('406 Error: Check headers and request format');
}
console.error('Error:', error.message);
});
Step 5: Test with a Simple Request
Create a minimal test request to isolate the issue:
curl -X GET "https://your-store.myshopify.com/admin/api/2026-01/shop.json" \
-H "Accept: application/json" \
-H "X-Shopify-Access-Token: your_access_token_here"
If this simple request works, the issue is likely with a specific endpoint or your request body formatting.
If you're in a hurry, here's the quickest solution: Ensure both your "Accept" and "Content-Type" headers are set to "application/json" in every API request. This resolves 406 errors in approximately 80% of cases. Additionally, verify that your API token is current and valid—outdated tokens can sometimes trigger this error even when headers appear correct. Tools like getshopifytoken.com can automate the token generation and validation step, ensuring you always have a properly formatted, fresh access token for your API requests without manual intervention.
Not necessarily. While an invalid token would typically return a 401 (Unauthorized) error, a 406 error specifically indicates a content negotiation problem. However, a corrupted or malformed token could potentially cause header parsing issues that result in a 406. If you're unsure about your token's validity, regenerate it from your Shopify admin dashboard or use an automated token service to verify and refresh it.
You should include the same core headers (Accept: application/json, X-Shopify-Access-Token) for both GET and POST requests. However, POST and PUT requests require an additional Content-Type: application/json header. GET requests don't have a request body, so the Content-Type isn't strictly necessary for them, but including it doesn't hurt and maintains consistency across your codebase.
A 400 (Bad Request) error means there's something wrong with your request structure—malformed JSON, missing required fields, or invalid values. A 406 (Not Acceptable) error means the request itself is properly formatted, but the server can't deliver the response in the format you requested. Think of it this way: 400 is about the question being wrong, while 406 is about the language you're asking in being incompatible with what the server can answer.
Skip the manual OAuth flow. GetShopifyToken automates the entire process — just paste your credentials and get your token instantly.
Generate Token Now →