Skip to content

Key error using your API #3

@ognjen011

Description

@ognjen011

Ok so i am using your API in a very simple script to send sms out pretty much identical as your example. It worked for a couple of months without a problem. The other day i started to get an error like below. the message still gets delivered but i would like to resolve the below problem.
I just modified this line to pass a data as a variable:

#response = clickatell.sendMessage(['1111111111'], "My Message rest")
response = clickatell.sendMessage([to], content)

Error:

File "/usr/lib/zabbix/alertscripts/clickatellsms.py", line 14, in
response = clickatell.sendMessage([to], content)
File "/usr/local/lib/python2.7/dist-packages/clickatell/rest/init.py", line 40, in sendMessage
content = self.parseResponse(self.request('messages', data, {}, 'POST'));
File "/usr/local/lib/python2.7/dist-packages/clickatell/init.py", line 45, in parseResponse
response['error'] = response['body']['error']
KeyError: 'error'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions