Action Network
Overview
Action Network is an online tool for storing information about and organizing volunteers and donors. It is used primarily for digital organizing and event mangement. For more information, see Action Network developer docs
Note
- Authentication
Only ActionNetwork accounts of the partner tier are able to access their API. You can generate your key from the API & Sync page, located in the Start Organizing menu, in the right column.
Quick Start
To instantiate a class, you can either pass in the API token as an argument or set the AN_API_TOKEN
environmental variable.
from parsons import ActionNetwork
# First approach: Use API credentials via environmental variables
an = ActionNetwork()
# Second approach: Pass API credentials as arguments
an = ActionNetwork(api_token='MY_API_TOKEN')
You can then call various endpoints:
# List all people stored in Action Network
all_contacts = an.get_people_list()
# Add a person
an.add_person('person.email@fakeemail.com')
# Add a tag
an.add_tag('fake_tag')
# Update a person
an.update_person('fake_id', given_name='new_given_name', tags=['tag_1', 'tag_2'])