06-22-2025 11:12 AM
Hello, Ramon here.
Help Needed: eBay Inventory API "Invalid value for header Accept-Language" Error
Problem Summary (please keep ion mind that i am a total noob and i was able to build what i did with what you shared and using claude each step so maybe it created extra stuff that broke it? LOL please help
I'm building an automated eBay listing system using AWS Lambda (Node.js) and the eBay Sell API. Everything works perfectly (OAuth, market research, AI analysis) EXCEPT creating inventory items. I keep getting this error:
{
"errors": [{
"errorId": 25709,
"domain": "API_INVENTORY",
"subdomain": "Selling",
"category": "Request",
"message": "Invalid value for header Accept-Language."
}]
}
What I've Tried
✅ OAuth working perfectly - can authenticate and call other eBay APIs
✅ Removed ALL language headers from my fetch calls
✅ Using only these headers:
javascriptheaders: {
'Authorization': `Bearer ${accessToken}`,
'Content-Type': 'application/json'
}
✅ Tried explicit header overrides:
javascript'Accept-Language': '',
'Content-Language': ''
✅ Verified code is deployed correctly
✅ Same error persists on sandbox and production
Code That's Failing
javascriptconst inventoryResponse = await fetch(`${eBayConfig.baseUrl}/sell/inventory/v1/inventory_item/${sku}`, {
method: 'PUT',
headers: {
'Authorization': `Bearer ${accessToken}`,
'Content-Type': 'application/json'
},
body: JSON.stringify(inventoryItem)
});
Environment
Platform: AWS Lambda (Node.js runtime)
eBay API: Sell API v1 (Inventory endpoints)
Authentication: OAuth 2.0 (working)
Scope: All required scopes granted
Location: US-based developer account
What's Weird
OAuth calls work fine with same token
Other eBay API calls work (account/privilege endpoint)
Only inventory creation fails with this header error
Headers look identical to working examples online
Questions
Has anyone seen this specific error? What was the solution?
Is AWS Lambda adding hidden headers that I can't see?
Should I switch from fetch to axios for better header control?
Is there a specific Accept-Language value eBay expects?
Are there any known issues with eBay Sandbox and language headers?
Inventory Item Structure
javascript{
"availability": {
"shipToLocationAvailability": {
"quantity": 1
}
},
"condition": "USED_EXCELLENT",
"product": {
"title": "Test Item Title",
"description": "Test description",
"aspects": {}
}
}
Any Help Appreciated!
This is blocking my entire project. I've spent days on this one error and I'm stumped. If you've successfully used eBay's Inventory API with Node.js/Lambda, I'd love to know:
Your working header configuration
Any gotchas with AWS Lambda + eBay API
Alternative approaches that work
Thanks in advance for any insights! 🙏
Cross-posting to r/webdev, r/aws, and eBay developer forums