Skip to main content

API Developers Forum

We're thrilled to see all the great development going on with the NationBuilder API, and want to open this forum up for public feedback, helps and hints, questions and more. This resource is curated by the NationBuilder API Team - our goal is developers helping developers, so we definitely want to hear from you. You can also use the tags to rank posts. Thanks!

Please check your e-mail for a link to activate your account.
Sort by

Criteria for External ID on Survey

I've been trying to specify and external id for my surveys. Sometimes if a really obvious one is chosen (e.g. 4) I get told that this has already been taken. When I pick a non-obvious one there is no error but the external_id fails to be reflected in the survey.

I don't know if this is a big or there's just some criterion that I'm missing for what constitutes a valid external_id.

Add your reaction

Custom fields – Define Text vs Checkbox

Currently, custom fields return a name and value. In the case of the Checkbox field type, there is no way to tell this apart from a Text field type. Where the custom fields for each nation is unknown, it is impossible to tell them apart and you end up with a situation where checkbox custom fields have to display a value of 1 or 0.

Add your reaction

Custom Fields list API method needed.

I think a new method is needed to list a nations custom fields and their types. For instance by only being able to view a custom field on a person I am unable to tell the difference between a text and a multiple choice field.

Also I am unable to infer the possible options for a multiple choice field if there is no person with that option. 

considering

This is something we will consider but does not have a timeline at the moment.

Official response from

2 reactions

Deleted/Merged webhook

This is needed to ensure proper cotnact synchronization between an external database and NationBuilder. You can delete from NB, but no webhook fires when data is removed or merged.

1 reaction

Deleting an address

How can I delete an address through the API? I have tried using the people/:id endpoint but if I pass an object with something like "home_address": null it doesn't do anything. If I pass an address object with all the components set to null (ie { "address1": null, "address2":null, etc. }) I can see from the main GUI that the components have indeed been blanked but there is still a "delete address" button, which suggests that the address still exists on the system albeit with blank components.

completed

When clearing out the address types (home_address, billing_address, registered_address, or mailing_address), you would need to pass empty strings and null with the request.

 

For example, you could use this curl with the PUT request on the People endpoint here:

curl -v -X PUT --header "Content-Type: application/json" --header "Content-Type: application/json" —data '{  "person": {"home_address": {"address1": "","address2": "","address3": "","city": "","county": null,"state": null,"country_code": "","zip": null,"lat": null,"lng": null,"fips": null,"street_number": null,"street_prefix": null,"street_name": null,"street_type": null,"street_suffix": null,"unit_number": null,"zip4": null,"zip5": null,"sort_sequence": null,"delivery_point": null,"lot": null,"carrier_route": null}}}'https://NATIONSLUG.nationbuilder.com/api/v1/people/PERSONID?access_token=TOKEN

 

Make sure to change NATIONSLUG to the slug of your specific nation, PERSONID to the ID of the person you are looking to update in your database and change TOKEN to your API token that you can get through Settings > Developer > API Token.

If you continue to have problems with clearing out the address fields, let us know and we would be happy to help through email at [email protected]

 

NOTE - this is not a solution for redefining a primary address as whilst you will be able to empty the address you will not be able to re-add that address as the “primary” designation remains even once the address no longer has data in it.

Official response from

3 reactions

description for the last_call_id does not make sense

  • last_call_id - the time and date of the last call to this person

Is that correct description? Looking at other field it should be 'last_call_at'. 

1 reaction

Designing a theme in a different software then importing to NationBuilder

I would like to design my nation in Webflow because that's what I already know how to use. Im not a developer; Im a marketer. How could I import this design into NationBuilder? Looking into the documentation a bit, I think i'll have to export the Webflow theme in Bootstrap format if possible? Then go and manually import each of the bootstrap files into the right places in the NationBuilder DropBox Bootstrap layout? Would anyone want to do this for me for a fee?

Add your reaction

Documentation Error

Hello, I found a small mistake in the API documentation. On https://nationbuilder.com/people_api under the Push Endpoint, it says " If a match is not found, a new person is created and a 201 status code is returned", which is correct: https://cl.ly/rUFV But further down the page under "Creation example" it says "A new record will be created with the provided attributes and you will receive a response of status 200" (note the 200 instead of 201): https://cl.ly/rV8G Minor issue, but wanted to let you know! Thanks!

completed

Hi Alex, thanks for bringing this issue to our attention. Indeed, when a person is created via the Push Endpoint, the 201 response code ought to be the accurate result, not the 200 response code. We've updated the People API documentation accordingly.

Official response from

1 reaction

Does access_token expire? oauth/token response includes "expires_in" attribute

In some tests I noticed that responses from /oauth/token have the attribute "expires_in". This attribute isn't included in the quick start guide example response, and a colleague found an article about access_tokens no longer expiring. Anyone have more information about this topic?

completed

D B - What Alex is referring to in his previous comment is that tokens no longer expire until they are manually revoked through the nation's control panel.

Official response from

9 reactions

Does Nationbuilder have a Rails 4 API gem in the works?

Really excited about all the new features coming out of NationBuilder's labs, am already starting to play with a few of them and have had some great successes. But, I'm sure I'm not the only Rails developer who's having a hard time organizing everything without a robust gem.
So, question for the NationBuilder dev team, and the larger developer community as a whole:
Do you guys have plans to make a Rails 4 gem for NationBuilder's API? It would be a really great way to streamline access to NB, and make it easier for developers to make applications that tap into the platform's potential. I see that ActionSprout has a Rails 3 gem on github, https://github.com/bellport/nationbuilder/. It's super-cool, but it uses an older version of Rails, is missing a number of components, and hasn't been updated in a while.
I was thinking of taking a stab at creating one. Haven't figured out the parameters of the gem itself, just that there's a need. Before moving forward on this though, I wanted to see if someone already has one in the works so we don't duplicate efforts? Or maybe there's room for collaboration?
Thanks!
3 reactions

Does the API allow access to the work address?

Many supporters have work addresses -- this is where the employer's address is stored when people give that info when making donations. 

However, it appears that the webhooks API only pushes out a supporters' primary address? This is not explicitly confirmed in the docs but I've done some testing and think this is the case. 

What's more confusing is whether or not this field is available via the REST api. The docs list every other address field. I'm wondering if this is a documentation omission, or if for some reason the work address isn't included? 

completed

Hi Brad,

We've updated webhooks (v4) to include work addresss, and made some updates to the API as well to make the included fields read/writeable via the People endpoint

Official response from

5 reactions

Donations API Documentation

http://nationbuilder.com/donations_api The Donations API description of the is_private field reads "false if the donation should not be posted publicly on the site". Is this correct? If is_private == false, then the donation is private; and if is_private == true, then the donation isn't private?

completed

I can definitely see why that language has caused confusion. The "is_private" field relates to a check box in the nation called "Don't post this publicly on the site" so when marking "is_private" as false you're unchecking that box meaning you do want the donation to display. Setting to true checks the box meaning you do not want it to display. I've updated the section in http://nationbuilder.com/donations_api

api_donation.png

Official response from

2 reactions

Donation Synchronization, and Donation Search Endpoint

For my organization's use case, we need a synchronization of all donation records, in order to produce financial reports, and for other uses.  This requires high reliability of the synchronization process.

  1. Webhooks provide a synchronization potential with the downside that, like webhooks of other internet-based services, there is almost no feedback about webhook invocation failures.  This makes not meet the requirements of our use case.
  2. Querying the table of donation records as a replacement, or a verification procedure, of the webhook method would be workable.  However, since donations do not currently provide a search endpoint with an "updated_since" parameter, this creates the problem of having to download the whole donation table each time a synchronization is required.  This limitation makes the method virtually unusable for production employment in our use case.

Could you lift any of these limitations, or is there another way to solve this problem.  Again, we have the legal necessity of not missing any records, or misrepresenting any record fields.

Thanks,

--

Pav

2 reactions

Duplicate records being returned when hitting the lists API

It seems that the data that we get when we pull through the API is different than the data that you get when you just download a CSV file from a nation. The result is that the lists we pull from your API had about 20% duplicates. 

completed

This is likely the outcome of using the export context type 'voter ballot'. The context type 'people' will return a single record per .csv file generated by the export API.

Voter ballot exports will have multiple rows with the same record because each row can contain a different election in which that record/person voted.

Official response from

1 reaction

email api?

Any thoughts on an email API that could help supporters recruit others? For example, I want to start a recruiting drive where each supporter recruits at least two others. I'd like to create an app that allows people to enter a few emails, use default/editable text, and send emails out right from the page on their behalf. 

5 reactions

Encoding of API responses

The headers in responses from the API specify "Content-type: application/json", but don't specify an encoding. As other aspects of the system use utf-8, I'm assuming that it should be "Content-type: application/json; charset=utf-8".  Am I right? If so it would be helpful if this could be fixed or documented.

 

completed

Andrew,

You are correct and can use "Content-Type: application/json; Charset=UTF-8".

Official response from

1 reaction

Endpoint for primary_country and registered_country?

The export csv contains address fields such as “primary_country” and “registered_country”, which contains the name of the country. The API People-endpoint does not contain those fields. The API does contain the “country_code” key. Is there another endpoint that allows me to read/write to the country name fields e.g. “primary_country” and “registered_country”?

completed

In general, you wouldn't be able to write to any specific "Primary" information because "Primary" is an address category and not a specific address type. For example, you are able to write to billing address, mailing address, registered address or home address and each one of those address types could be listed as the "Primary" address within the Control Panel.  

For example, if you wanted to add a country code to the registered address for a person in your database, you could send this json payload with your POST or PUT request through our API:

{
"person": {
  "registered_address": {
    "state": "TX",
    "country_code": "US"
  }
 }
}

Similarly, you can change out the "registered_address" with "billing_address", "home_address", or "mailing_address", depending on which sort of address country code you are trying to modify. 

Official response from

1 reaction

error "nation_not_found"

I followed the PHP API Quickstart guide http://nationbuilder.com/php_quickstart and was able to easily obtain an access token. However, when I am trying to use the API in any way I get the following error response:

Array ( [result] => Array ( [error] => nation_not_found [message] => The nation identified by this request was not found. ) [code] => 404 [content_type] => application/json )

My nation is safestreets.nationbuilder.com, is there a setting I have to enable in order to use the API? Thanks.

 

3 reactions

Event details missing from API

I'm attempting to check the tags that will be added to users when they RSVP, but that attribute does not appear to be returned by the events API. We get the page tags, but not the RSVP tags. Seems like those are saved here — [signup_action_callbacks_attributes][0][tag_list] When setting up any number of events, it's very easy to miss a setting, and this is a major point of pain for my nation — if an event goes by and the RSVP tags are missing, we've got a whole set of people mis-tagged. I'm just trying to build a tool that would flag those events so we can fix them — so I'd only need read access to this attribute. Wondering if there's any way I can get access to this attribute on events?

Add your reaction

Events API "guests_count" parameter clarification

Posted this on the Events API page (http://nationbuilder.com/events_api) but thought I should post here as well:

For the guests_count parameter, what is the API referencing? When you create an event, you have the option to do a simple RSVP and include +1s. However, if you have ticket sales, you purchase a number of tickets. Does guest_count reference +1s or number or tickets, or both? Ideally, it would great if it’s both!

Add your reaction

/events/:id has Contact.phone missing 1st number

Ive tested this in the API explorer as well as with the following command line invocation:

curl -X GET --header "Content-Type: application/json" --header "Accept: application/json" https://agv.nationbuilder.com/api/v1/sites/agv/pages/events/\?id\=...\&access_token=...

 

Both produce contact phone numbers with the first number missing

e.g. 0411222333 is given as 411222333

Viewing the event via http://victoria.greens.org.au/ocean_grove_doorknock_and_snack 

we see that the correct, full phone number is displayed.

Can you please fix this?

2 reactions


Expand the /nearby endpoint

 

This could be a really powerful tool for our canvassers. But.... when I tried to build off it, I ran into a couple roadblocks.

  1. A 1mi search radius is far too big for someone walking around door-to-door
  2. There wasn't any way to limit the search to only people with complete addresses on file

completed

This was just a bug, you should be able to put a distance in a parameter, 1 mile was only meant to be a default.  Thanks for the feedback!

Official response from

3 reactions

Exports API for a Nation

There is an Exports API for a specific list. (POST /api/v1/lists/:list_id/exports). Is there an API to export all people from a nation?

2 reactions

Exports "Create/Run" endpoint won't work

I can't seem to get the Exports Create/Run endpoint working through either the API explorer or actual calls from code. I am adding the following json to the request body:

{
    "export": {
        "context": "people"
    }
}

and adding the list_id to the query string but all I get in response is HTTP 406 (Not acceptable). Am I doing something wrong?

Additionally, the API explorer doesn't allow you to provide a value of the list_id parameter for this endpoint.

completed

Hi Kevin,

Thank you for letting us know about this - there's was an issue with the API Explorer that has now been resolved.

The url for the request for an export should be POST https://slug.nationbuilder.com/api/v1/lists/:list_id/exports with the request body as you had specified in JSON.

Ex: 

curl -X POST -H "Content-type: application/json" 'https://<slug>.nationbuilder.com/api/v1/lists/<list_id>/exports?access_token=<access_token>' --data '{"export":{"context":"people"}}'


Best,

Alex

Official response from

3 reactions

Exports via API do not include "updated_at" field

The "updated_at" field is not included in exports initiated via the Export List endpoint;  "created_at" is included. Could "updated_at" be added please?

considering

This is something we will consider but does not have a timeline at the moment.

Official response from

2 reactions

Expose more functionality via API

We have tried to integrate our donation management system with NationBuilder and have had some limitations in your api preventing this. It would be nice to have NationBuilder expose via API:

  1. A way for an unfulfilled pledge (i.e. non paid pledge) to be created into a nation
  2. Get a list of unpaid pledges
  3. submit payment for a pledge and mark the pledge as fulfilled

This would allow us support NationBuilder as a possible persistence backend in our application

http://nationbuilder.com/suggest?utm_campaign=public_issues&utm_medium=email&utm_source=3dna

completed

Hakeen,

This is currently possible with our existing APIs as described below:

1. You can use the people API / push endpoint and the donations_pledged_amount_in_cents resource to create an unpaid pledge. 

2. This is rather complicated, but you could use the people API / show endpoint to get a full representation of a record including pledge amount and then cross-reference this using the donation API / index endpoint for whether a pledge_id exists. Records with a pledge amount but without a pledge_id will be everyone in the nation who has an unpaid pledge.

3. This is possible using our donation API/pledge_id resource. This resource is the id of the pledge a donation submitted via the donation API fulfills.

Official response from

2 reactions

Extend Oauth 2 implementation to include Resource owner credentials grant

For cron jobs or similar we need Nationbuilder to extend it's Oauth2 model to include Resource owner credentials grant

2 reactions

Extend tags API to include tag counts

Right now, the only way to find out how many people are tagged with a specific tag in your nation, via the API, is to call the people method, which returns a paginated list of people with that tag. You then have to go through every page, incrementing the counter for every person. Needless to say this involves a fair few API calls for large tags.

There's already a tag index where you can see a list of tags - we just need that index to include a number too.

considering

This is something we will consider but does not have a timeline at the moment.

However we are paying close attention to the most popular suggestions so please share and encourage others to follow and comment!

Official response from

4 reactions

Feature Request: get and add People relationships

It would be great to see the ability via the API to get any existing relationships a person has and add new ones, as you can do via the GUI.

considering

This is something we will consider but does not have a timeline at the moment.

Official response from

6 reactions

Fields that can be mapped to NationBuilder from 123contactform

I've been using the new 123contactform integration and it is fantastic!  But...it seems to be missing some standard fields that are available in the people/edit page on NB. 

From 123contactform you can map to home, meetup (what is this? it doesn't seem to exist on the NB side), billing, and mailing addresses, but there is no work address available.

Also, the primary address is there, but according to other posts I've seen, the primary designation is set to whatever address gets populated first.  When mapping from 123contactform to NB on the primary address fields, it doesn't populate because of that.

There is also no work phone available. 

Can you make work phone, work address, and website available in the integration?

1 reaction

François Kooman's PHP OAuth client now includes support for NationBuilder

If you're building PHP apps on our API, this should come in handy. Please note that this is third-party code and is not supported by NationBuilder. PHP developers have also indicated that Lusitanian's library is helpful. For official resources, browse our docs.

1 reaction

Get notes on person's profile via the API

With the current People API you can add a note to a person's profile which is great! However, it would be fantastic if you could also get those notes too via the API.

considering

This is something we will consider but does not have a timeline at the moment.

Official response from

13 reactions

Get the Name and Abbreviation of Capital for a Nation

 

Is it possible to get the custom name and abbreviation that someone has assigned to the (political/social) capital feature?

For example, if someone has changed "Political Capital" to "My Community Points" ("MCP"), we want to use that as the label when displaying capital_amount_in_cents. Displaying "Political Capital" generically could confuse people in many cases.

 

 

completed

There are not currently resources for the name or abbreviation assigned to a nation's political capital.

That said, this sounds like a very useful feature and I recommend that you request that it be added through our product suggestion page!

Official response from

1 reaction

Getting data on fundraisers' goals and amounts raised so far

 

We'd like to do analytics to track things like progress toward individual fundraisers' fundraising goals. To do this, we'd need to 1) determine whether a person is a fundraiser, 2) get their fundraising goal amount, and 3) add up all of the individual donations that that fundraiser has raised so far.
According to Adriel, there's a "is_fundraiser" field that will be surfaced, so it sounds like that takes care of the first requirement. Is there also a way to get a fundraiser's goal amount, if that's been set in the UI?
Also, in the Donations API documentation, it says we can get information about individual donations in this form:

[

    {

 

      "id": 314,

 

      "amount": "$10.00",

 

      "succeeded_at": "2013-02-21T10:04:15-04:00",

 

      "corporate_contribution": false,

 

      "fec_type": "Contribution",

 

      "donor": {

 

        "id": 8472,

 

        "first_name": "Sarah",

 

        "last_name": "Kerrigan",

 

        "email": "[email protected]"

 

      },

 

      "election": {

 

        "cycle": "2013",

 

        "period": "Primary"

 

      }

 

    }

 

  ]
Besides "donor" is there some field in the Donations API that gives information on the fundraiser who raised that individual donation, so that we can link fundraisers with all of the donations they've raised? Thanks!
-Ted
1 reaction

Getting the code with PHP

I think there is a problem with the quickstart for PHP.

Someone with access to the Nation's resources will have to visit that url in a browser, accept the application and retrieve the authorization code from the page url. That page url will look something like:

GET http://yourapp.example.com/oauth_callback?code=123456abcdef

Use the code to generate an access token:

But it doesn't make sense, this a program, not a person accessing a browser and getting the code. How can I get the code 

using PHP, not someone visiting the url in a browser?

 

Anthony

completed

The process this is describing is the admin workflow for authenticating the application with the nation. We have example code for authenticating with PHP in our API documentation.

Official response from

2 reactions

Google App Script API problem

I am having an issue with a simple app script to create a person record in NationBuilder. I've checked my JSON data and verified it with REQBIN and it works in the API explorer. The error is "I can only talk JSON. Please set 'Accept' and 'Content-Type' to 'application/json'" I have both of the attributes in the options model. I've even tried every possible capitalization combination.??? If anyone has some google app script that is known to work, I would really appreciate it. Everything I have found so far isn't working. TIA.

completed

I am happy to take a deeper look at the code you are using. I haven't received any other reports from other customers on this recently and I am currently using the create a person API fairly regularly.

Would you be able to send your code to me at [email protected]?

Official response from

1 reaction

Has anyone used Formidable API (WordPress) with the Nationbuilder API?

I am working with a group that has a WordPress  website with the Formidable plug-in. They want to create forms in WordPress and have the information passed to Nationbuilder in real time. Does anyone have knowledge or experience in setting up the Formidable API to connect with the Nationbuilder API?

2 reactions

Help of C# api sample code

Hi

Can you please advise what the reference of EndPointProvider and ServiceRequest<PersonContainer>, it shows error (both object are not existing) when I build the PesonSerivce.cs file.

publicPerson CreatePerson(Person person)

{

string endpoint = EndPointProvider.GetCreatePersonEndPoint();

var container = newPersonContainer(person);

var request = new ServiceRequest<PersonContainer>(endpoint, container);

PersonContainer result = PostWithResult<PersonContainer, PersonContainer>(request);

return result.Person;

}

 

And same issue happens on the Service.cs,  Task<HttpResponseMessage>,

ConfigProvider and MediaTypeWithQualityHeaderValue("application/json") cannot be found.

Such as code below

 

 

privatevoid SendRequest<T>(ServiceRequest<T> request, Func<HttpClient, Task<HttpResponseMessage>> sendFunc)

whereT : class

{

using (var client = newHttpClient())

{

client.Timeout = ConfigProvider.ServiceTimeout;

client.DefaultRequestHeaders.Accept.Clear();

client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));

Task<HttpResponseMessage> postTask = sendFunc(client);

Task.WaitAll(postTask);

HttpResponseMessage response = postTask.Result;

if (response.IsSuccessStatusCode)

{

return;

}

Task<string> responseTask = response.Content.ReadAsStringAsync();

Task.WaitAll(responseTask);

string responseText = responseTask.Result;

string payloadString = request.Payload != null ? JsonConvert.SerializeObject(request.Payload) : null;

Logger.Error("Error sending {0} to: {1}. Response: {2}", payloadString, request.Endpoint, responseText);

thrownewInvalidOperationException("API call failed.");

}

}

 

 

regards

Stanley

Add your reaction

How can a nation identify itself to an installed app?

I am building an app integration. I've implemented the OAuth flow described at https://nationbuilder.com/api_quickstart. Suppose that two nations, N1 and N2, both install my app. As a result of following the OAuth flow, my app has now obtained API tokens for both nations, so it can make API requests on behalf of either one. I want to limit who can prompt my app to act on behalf of a given nation. For example only someone affiliated with N1should be able to prompt my app to access N1's data via the NB API. Conversely someone affiliated with N1 should not be able to prompt my app to access N2's data. In order to limit access appropriately, my app needs a way to know which nation is asking it to do something. How can nations identify themselves to my app in a secure way?

completed

Usually the apps are authenticated through OAuth for each individual nation. It wouldn't be a good idea to let people who install your app to have access to all other nations who are authenticated through the app. In general, each nation will have individual OAuth Client ID's, Client Secrets and Auth Tokens. Since only admins of that nation can generate auth tokens (through the OAuth process), it should inherently be impossible to access data from another nation from within your app (depending on how it was built). Apps are identified through the Client ID and Client secret that are registered individually through the Developer tab in NationBuilder from within each specific nation.

If you could send us more specifics on how you are building the app, we would be happy to help suss this out with you!

Please send us an email to [email protected] and we can work with you on getting this resolved.

Official response from

1 reaction

How does one create a sub page of a page through the API

There doesn't seem to be a way to either create pages as sub pages through the api or to attach existing pages to other pages as sub-pages.

Any help would be appreciated.

Thanks,

Steve

8 reactions

How to add a tag to user?

I have already used PUT people/:id/taggings api for that. But it is giving me response Bad Request Your browser sent a request that this server could not understand. [code] => 411 [content_type] => text/html )

completed

Hi there,

Try setting the Content-Type to application/json. I used the following curl command and received a 200 HTTP response:

curl -v -X PUT --header "Content-Type: application/json" "https://{slug}.nationbuilder.com/api/v1/people/{person_id}/taggings?access_token={token}" -d '{"tagging":{"tag":"{tag}"}}'

Official response from

1 reaction

How to check if someone is logged in via the api

Hi,

I've got a simple PHP app running on our site but I want to know who is using it and ensure obviously only the right people can use it.

Can someone point me to the docs on doing just that please?

Mat

 

Add your reaction

How to check if user has control panel access via API?

Hi all,

is it possible to check if the user has control panel access via the API? Perhaps also with their access level? Maybe using the /api/v1/people/me endpoint? Thanks!

considering

Craig,

It's currently not possible to know who has control panel access through the API. Permission sets aren't a resource the People API returns in the response body.

Official response from

3 reactions

How to get client id and api secret

How to get client id and api secret

completed

Steps 3 and 4 of our API Quickstart guide describe how to obtain a client ID and API access token:

http://nationbuilder.com/api_quickstart

Official response from

2 reactions

How to get people that appear on "Contacted By" page on the data entry sheet of a list?

Hi all, do you know how can I use the API to get the same list of people that appear under "Contacted By" on the data entry sheet?

I'm working on a data entry app and would like to have similar functionality to be able to choose who contacted a person. Thanks!

completed

You can do this using the contact API/index endpoint and passing in the author_id parameter. A request using cURL would like something like this:

curl 'https://{slug}.nationbuilder.com/api/v1/contacts?author_id={id}&access_token={token}'

Official response from

11 reactions

How to get the registered address throught the API

Hi, It is possible to get the primary address, but I can not find a way to get the registered address. What can I do? Thanks

Add your reaction

How to save access token in PHP?

I've tried saving the access token as a key/value pair in the $_SESSION variable, but if

a) I encrypt it and then save it, on the next page or request, it has changed or 

b) I don't encrypt it and save it as a string, it is deleted from $_SESSION on the next page.

 

What am I doing wrong here? I need to make multiple requests in sequence and have a feeling I shouldn't need to ask for a new access token with each one. Thanks!

4 reactions

How to set 'last_contacted_by'

We are trying to set this field on update. We set id to an existing person is, however do not see this was reflected on the updated person page.

"last_contacted_by ": { "id": "XXX"  } 

 

Also, 

 

 

2 reactions

How to set the featured content

I'm trying to import a few Wordpress sites using the API.  On each of them every blog post has a header image.  The equivalent in NationBuilder would be to add a signle featured content slider to each page, but I don't see anything in the API to do this.  Am I missing something?  If this can't be done, is there a way to set HTML before the content_before_flip?

Add your reaction