Public users

If it’s necessary to record data about the activity of users in other systems, the API may be used to create records known as Public Users in My Campaign mode. Public Users are created using the identifiers property in the POST /people/findOrCreate request, provided the type property is configured as a Public User identifier. Please email [email protected] to configure an identifier type for use in the Public User system.

For example, a Public User may be created as follows:

POST /people/findOrCreate

{
    "firstName": "Becky",
    "lastName": "Smith",
    "identifiers": [
      {
        "type": "AcmeCRMId",
        "externalId": "becky.smith"
      }
    ]
}

Once a Public User has been created, the user should be indicated by providing the type and externalId values as Base64-encoded values in the X-NGPVAN-User-Type and X-NGPVAN-User-Token headers, respectively.

Now the Public User created above may be specified as the actor on an API call as follows:

X-NGPVAN-User-Type: QWNtZUNSTUlk
X-NGPVAN-User-Token: YmVja3kuc21pdGg=

In this case, the type “AcmeCRMId” has been Base64-encoded, yielding the Public User Type “QWNtZUNSTUlk”, and the identifier “becky.smith” has been Base64-encoded, yielding the Public User Token “YmVja3kuc21pdGg=”.

As a result, when the API request is received, additional information is recorded about the Public User, indicating the person who triggered the request. For some API requests, providing the Public User headers in this manner will provide better visibility as to which person took an action. For example, use of the Public User system makes it easy to see which external user contacted a voter, when viewing contact history.