Closed mvabase closed 1 year ago
I'm not sure how that could possibly work since at that point (line 22) there is no such thing as self.pluginPrefs.
I fixed the typo.
I tested the existing code again, and it works fine. I did just add validation to the config dialog to make sure an API token is entered.
Hi,
Thanks for the plugin.
In Indigo 2022.1.2 and version 2022 of the plugin, it seems that the script does not receive the API key in line 22.
Upon installation the plugin cannot get the list of sounds (Error getting alert sounds list: 'sounds') and messages fail to send (Post Error - Result: {"token":"invalid","errors":["application token is invalid"],"status":0,"request":"5d183b1f-d2d9-4a55-aceb-cb6e28fb5e03"}). Also when leaving the API field empty the warning in line 24 is not raised)
I replaced line 22 with this and now it works:
self.apiToken = self.pluginPrefs['apiToken']
Less important: there is a typo in line 24 ("PI" instead of "API) ;-)
Thanks, Marc