diff --git a/pyicloud/services/findmyiphone.py b/pyicloud/services/findmyiphone.py index e3e8564..1d9971c 100755 --- a/pyicloud/services/findmyiphone.py +++ b/pyicloud/services/findmyiphone.py @@ -35,7 +35,19 @@ class FindMyiPhoneServiceManager(object): """ host = self._service_root.split('//')[1].split(':')[0] self.session.headers.update({'host': host}) - req = self.session.post(self._fmip_refresh_url, params=self.params, data='{"clientContext":{"fmly":true,"shouldLocate":true,"selectedDevice":"all"}}') + req = self.session.post( + self._fmip_refresh_url, + params=self.params, + data=json.dumps( + { + 'clientContext': { + 'fmly': True, + 'shouldLocate': True, + 'selectedDevice': 'all', + } + } + ) + ) self.response = req.json() for device_info in self.response['content']: