I am getting the following error when I run the code, I just copy and paste your code only I replaced the authentication credentials;
Error executing API call: The supplied body could not be parsed correctly, see the details field for additional information.