What is this?

This is an error I got while working on linking an Alexa device through an A4B (Alexa For Business) device-maker service I was implementing for a project. The sample device-maker service published by Amazon can be found here.

I was trying to use the ‘/device/register’ endpoint in the sample service. I generated a code using a curl command to the ‘https://api.amazon.com/auth/O2/create/codepair’ endpoint. Once I’d posted my code and DSN in the body of a request to the ‘/device/register’ endpoint’, I received the following error back from Amazon’s API:

“GlookupProductFromAttributeSet for device type was called with a non-existent ProductID: <ProductID>, VendorCode: <VendorCode>“

I had no idea what the error meant and tried to googled it. There were no results. I think the error is generic so the fix for me may not be the fix for everyone. The fix for me was that the clientID was incorrect in my original request to the ‘https://api.amazon.com/auth/O2/create/codepair’ endpoint. Once I’d corrected it I was able to register devices for A4B through the sample device-maker service. So if you’re looking at this post, try verifying that your clientID matches what appears in your AVS console product page.