No problem. The variant ID is actually different from the product ID. If you are using the Products API, it would be the "id" property under the variant object.
In the code sample I posted, the Content-Type header was also moved. Did you try changing that as well?