Are you using Add-on Builder 2.0?
In 2.0, the Add-on Builder leverages Single Instance mode by default. This basically means the mod input script is called once for ALL the inputs. This means ALL configurations for the input are provided to the script from the helper functions, as a dictionary.
Here is the code I'm now using to work that way. Since it checks for whether or not helper returns a dictionary, the code works in both test mode (returns single value) and for configured inputs (returns a dictionary).
def collect_events(helper, inputs, ew):
"""Implement your data collection logic here"""
stanzas = helper.input_stanzas
for stanza_name in stanzas:
opt_access_token = helper.get_arg('access_token')
opt_access_token = opt_access_token[stanza_name]
# ALL the other pre-tasks, API querying, && event writing
... View more