Before using the API, you will need to know your Application Name and API Key. The Application Name is a short string that identifies your application (e.g., acmeCrmProduct) and the API Key is a string that identifies the specific context to which API requests should resolve. Specifically, it identifies an API user in an instance, database tab, and committee–the same information that is determined during the typical VAN login process.
The API key will look like the concatenation of a GUID, a |
and a 0
or 1
(e.g., 7c9e6679-7425-40de-944b-e07fc1f90ae7|1
). Database Mode is set by using 0 to work in My Voters or 1 to work in My Campaign. Because the API key is connected to a specific context, the API will only return data available to that context.
API keys are connected to specific developers and applications. Do not share or re-use an API key for different applications nor expose it via client-side scripts or public code repositories.
To authenticate your API requests, use Basic HTTP authentication and set the username to the Application Name and password to the API Key. Most programming frameworks supports basic authentication out of the box.