DevicesApi->update_device_token: error (0) Reason: Cannot prepare a request message for provided arguments


I have tried an example update_device_token
So I got an error: Exception when calling DevicesApi->update_device_token: (0)
Reason: Cannot prepare a request message for provided arguments.
Please check that your arguments match declared content type.

I have refilled them by my arguments:
artikcloud.configuration.access_token = ‘YOUR_ACCESS_TOKEN’
device_id = ‘device_id_example’ # str | deviceId

Thank you for reading.


Hi there, can you help confirm if you are able to make any other API calls
or just having issue with this one?


Yes. I can’t use update_device_token API but can call the other APIs. So, I wrote a function using HTTP request to do the same thing.
However, Please check and fix this API for another one.
Thank you so much.


Thank you for reporting. The issue - it is set with the wrong content-type “text/plain” (it should be ‘application/json’). I recommend your approach for now (ie: make explicit HTTP API call) as I am unsure when another versioned release for this would be available for this.