Thanks a lot shmi it works like a charm!

Thanks a lot shmi!

I did as you said but it looks like I do not have access to that resource as I get Error:7.

How to I rectify this error?

It should be said that the I am able to retrieve geofence details from the JavaScript API.

Hi,
I am new to the Wialon API and therefore the problem I have is a relatively simple one. I am currently trying to use the Python Wialon module to get a list of existing geofences and their details. Attached below is the code I used:

from wialon.api import Wialon, WialonError
from wialon import flags

try:
    wialon_api = Wialon()
    result = wialon_api.token_login(token='MYKEY')
    wialon_api.sid = result['eid']

    result = wialon_api.avl_evts()

    spec = {
        'itemId': '4096',
        'col': '[]',
    }

    try:
        geofences = wialon_api.resource_get_zone_data(spec=spec)
        print(geofences)
    except WialonError as e:
        print(e)


    wialon_api.core_logout()
except WialonError as e:
    pass

However, this resulted in the following error:

WialonError(Invalid input resource_get_zone_data (4))

What might I be doing wrong?

Thank you in advance.