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!

Sort by

Unsubscribe Handling?

What's the best way to unsubscribe a person from the email list? Update the Person record and set an unsubscribed_at timestamp?

Can we receive a webhook when unsubscribes happen on your side? Or does person.updated already trigger for unsubscribes?

We're looking at propagating unsubscribes that happen on our system into NationBuilder. 

Nathan 

Official response from completed

Hi Nathan,

Using the API, the way of unsubscribing a person would be to change the email_opt_in value on a person resource to false, this would set the unsubscribed_at timestamp automatically to the time at which the change is pushed back to the profile in the nation.

Additionally, while there isn't a webhook for unsubscribes, the person_changed webhook will fire when someone's email preferences change in the nation.


I hope this helps,

Alex

1 reaction Share

People Search Api not showing results

 

hi,

I am new to using the nation builder api. I have added multiple contacts to my account and trying to search on them using various fields. But I am unable to get the results.

The following person exists in my contacts and i can get it when I use first_name and last_name in the search parameters, but If i use city or state i am unable to get results.

https://slugName.nationbuilder.com/api/v1/people/search?first_name=Jennifer&last_name=Rolle

primary_address: {

address1: "address"
address2: "3"
address3: null
city: "Fort Lauderdale"
state: "FL"
country_code: "US"
zip: "33311"
}
but if i use https://slugName.nationbuilder.com/api/v1/people/search?state=FL
i get no results
{
results: [0]
next: null
prev: null
}

 

Official response from completed

Hi Ella,

There was an issue with people#search where instead of searching the primary address, the home address of people was searched instead (people in NationBuilder can have up to 7 different addresses, more on that here - including how to set primary address for a person). This explains why you weren't seeing results through the API as your nation didn't have any home addresses that matched what you were searching for.

A fix was pushed out today, and searching city or state through people#search should now return results that match based on the primary addresses of folks in your nation.

Best,

Alex

4 reactions Share

Returning people including expiration date

I'm working on an integration tool to create newsletter labels for our members. It seems I can get the GET /api/v1/people endpoint fine but not with the expiration date, as this returns an abbreviated member. I'm aware there is the /person/:id endpoint, but this would affect acceptable usage to have to call this for every user in the database (currently >1000).

Given memberships are such a big thing with the types of organisation on NationBuilder, I would think this is going to be a popular endpoint if added.  What we really needed is an endpoint that returns an abbreviated member record that also includes an expiration date.  At the moment it seems that what we want to accomplish isn't possible, particularly with the rate limiting currently in place.

For what it's worth in our previous system we pulled all records from a local database to determine the labels and which need renewal forms to be added.

A less ideal alternative would be a variant to /match or /search with a parameter with an expiration date range option.

4 reactions Share

Person API "created_at

For the PUSH endpoint of the PERSON api, will updated persons have the "created_at" property overwritten with the time that the update took place -- the same value also appearing in "updated_at"?  (for whatever reasons, this is the case in the API docs

Official response from completed

Hey Lilia,

The people#push endpoint allows you to update or create a person in your nation. When the request creates a person, the two fields you mentioned (created_at and updated_at) will be the same. In other cases where the request matches an existing person in your nation, the updated_at field will change (along with the other data passed in the request) on the person's profile.

I hope this helps clear things up!

2 reactions Share

Person could_vote_status values are Inconsistent with On-line Documentation

The documentation of "Person Resource" at <http://nationbuilder.com/people_api> says

could_vote_status - boolean indicating if this person could vote in an election or not, derived from their election-related IDs

However, the examples, and, actual, server responses contain values null, -1,  1.

This seems to be a nullable integer. Trying to parse it as a boolean can cause your application to fail.

What are the possible values, and their meanings for this field?

Thanks,

Pav

2 reactions Share

API based credential checking?

hi all,

I'm designing an app which will have 2 parts;

  • a (server-side) token request service which has an access token to operate the NB API
  • a browser based app which will needs to use the NB API, so requires its own access token

I'd like to restrict the usage of the browser app to people with current credentials in my NB site, and potentially tagged in a certain way. Something like this;

  1. user posts credentials (userid, pwd-hash) to my token request service
  2. my service uses the NB API to check the user's credentials (userid, pwd-hash) 
  3. if good, the service requests a new access token for the user and returns it to the user's browser ... this is the reply to the request (1)
  4. user's browser app can now operate the API and do something useful.

Is there an API call to support (2) ??

Is this a reasonable pattern?

Nick

2 reactions Share

[API] Relationships between People to People/Organizations are not available

We are not able to add relationships either between people with each other or with an organization through the API provided by NationBuilder.

We are trying to add various types of users on NationBuilder, such as adding a student and a school. However, we want to assign that a particular student has the relation "Student At" his/her school. This assignment is not available as the current API version does not support the endpoint "Relationships".

Is there a solution to set these relationships?

Thanks

Mohamed Hisham

8 reactions Share

User information is not updated same email (WordPress - API - NationBuilder)

We are not able to update existing user Account (user is registerred only with email address) with additional information (like First Name, Last Name, phone) that will be submitted later using the same email address...

We are inplemented custom form on WordPress website and already integrated with NationBuilder (API based). All new users, who submitted via our form are registerred in NationBuilder. BUT if user will send via form new personal info with the identical email as was registerred - NationBuilder will not update user info (error: user already exist). User's Password in NationBuilder was not created or edited (so do not think this is the issue).

We tried 2 variants http://apiexplorer.nationbuilder.com/nationbuilder#People  , but both are failed.
See below.

Look forward to hearinf any comments.

Regards

---------

Variant 1

$dataBuilder = array (

'person' => array(
'email' => "","last_name" => "Smith", "first_name" =>"Bob" 
));

$token = '3b30b97feea94bf20c31f83eb787d7d86b8a373561925d5b007a6bb6b79848d0';
$url = add_query_arg(
array('access_token' => $token), 'https://beekeepersandbox.nationbuilder.com/api/v1/people/push'
);
$json_data = json_encode($dataBuilder);
$ch = curl_init($url);

curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_TIMEOUT, '10');
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Authorization: $token", "Content-Type: application/json", "Accept: application/json"));
curl_setopt($ch, CURLOPT_POSTFIELDS, $json_data);
$result = curl_exec($ch);
$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$content_type = curl_getinfo($ch, CURLINFO_CONTENT_TYPE);
if ($curl_error = curl_error($ch)) {
throw new Exception($curl_error, Exception::CURL_ERROR);
} else {
$json_decode = json_decode($result, true);
}
curl_close($ch);
$response = array(
'result' => (null === $json_decode) ? $result : $json_decode,
'code' => $http_code,
'content_type' => $content_type
);

We get empty result without errors.

 

Variant 2

$params = array(
'person' => array(
'email' => '','home_address' => array('country' => 'Germany', 'zip' => '66666' ))
);

$header = array('Authorization:' => $token,'Content-Type:' => 'application/json', 'Accept:' => 'application/json');
$response = $client->fetch($baseApiUrl . '/api/v1/people/push?access_token=myaccesstoken', $params, 'PUT',$header);
print_r($response);

i get the following response

Array
(
[result] => Array
(
[code] => missing_parameters
[message] => Missing Parameters.
[parameters] => Array
(
[0] => person
)

[inner_error] => Array
(
[name] => Api::Error::MissingParameters
[message] => Missing parameters: person
)
)
[code] => 400
[content_type] => application/json
)

2 reactions Share

Comments API

Any chance we’ll see access to the Page Comments API in the near future? I’d love to be able to leverage Disqus comments without sacrificing the value of the native comment platform (i.e., creating new signup records and appending comment information to existing ones).

2 reactions Share

Survey API endpoints

Is the survey aspect of the API live?  When I try to update survey questions I get this response back: 

{
   
"code":"not_found",
   
"message":"Record not found"
}

I am using this json to pass it through:

{
"survey_response": {
"survey_id": 1,
"person_id": 2,
"question_responses": [{
"question_id": 2,
"response": 1
}, {
"question_id": 1,
"response": "yes"
}, {
"question_id": 3,
"response": "cool"
}]
}
}

7 reactions Share

blog post images

Hi,

Reading here: http://nationbuilder.com/blog_post_page_variables

Is it possible to show a blog posts attachments or feature silder (I can see those options aren't listed...)?

Is it possible to check if a page has a specific attachment?

Thanks,

 

Mat

 

Official response from completed

Hi Matt,

Sure - via Liquid it's possible to see the attachments for any particular page using page_attachments (more information on that here). There are also some additional variables for featured content sliders, which are called a bit differently.

Using the API, this is possible through the page attachments endpoint where you could view a single (or all) attachments on a page, or upload your own. Featured content sliders, on the other hand, aren't currently accessible through our endpoints.

Hope this helps!

Alex

2 reactions Share

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?

5 reactions Share

"name" parameter to /people/push API does not get saved

When creating a new user via the API /people/push if only "name" is passed, nation builder ignores it (instead of parsing out first name/last name).

If I pass first_name/last_name then it does grab that, however the system were we are getting the data from does NOT have a first/last name - and I dont want to build the logic to guess at seperating them from the user input.

Also, its ignoring twitter_id
And I also found that you need to push "twitter_login" as the twitter handle, where the documenation says "twitter_name" as the handle.

1 reaction Share

Using the API from "pure" Javascript

I'd like to call into the API from within some JavaScript code, purely running in the browser.

How can you authenticate safely if you want to use the API purely on a client side application?  Many APIs allow you to restrict a token to a single or set of referrers (so they only work on sites under certain domains).  Is there a similar mechanism within NationBuilder's API?

 

17 reactions Share

Sending email blasts using the API

Hi,

I was wondering if it's possible to send email blasts through the NationBuilder API.

We currently assemble our newsletter in our CMS (Drupal), and then send out the generated HTML page using our mailing list provider's API, from within Drupal. Is this possible with the NationBuilder API? And if not, is this something you are planning to add to the API?

Thanks!

1 reaction Share

Webhhok support

I would like to run a PHP webhook from a 3rd party payment portal on a NationBuilder site. The payment is sent to the payment provider from the NationBuilder site and I would like to send custom emails when the payment is approved. I have already written and tested the script on my own server.

Is this possible on NationBuilder websites?

1 reaction Share

Pagination on the API returns different results in production vs. testing environments

It seems that the API returns different responses in my testing and the production environments, specifically for the case of the survey_responses endpoint. I don't get the pagination variables in the production environment, and, as a result, my code breaks. 
In my app, I need the pagination information in order to loop through the all of the survey responses for a client and gather all the relevant responses based on user ID. It's a major part of the app as they're expecting a lot of responses and pagination will eventually become an issue, so I need more than the max 1000 that is set by the API.
So, part of my method asks: 
client.call(:survey_responses, :index, survey_id: 47, per_page: 1000)

When I run this method locally, I get the pagination information up at the top (page, total_pages, per_page, total); the same result as in NB's API Explorer. When I run it in my production environment... Heroku, nada.

The interesting thing is that the "next" and "prev" hash show up both locally and in production. So, I also tried to use them as markers to loop, making API calls until the "next" hash returns nil, spelling the end of the pagination. Again, this works perfectly fine locally. However, in production this actually made it worse because it resulted in an infinite loop which crashed the app. It seems the API never actually returns next as "nil", but instead keeps returning a unique API URL to the "next" set: "/api/v1/survey_responses?__nonce=[omitted]&__token=[omitted]&page=1448&per_page=100&survey_id=47"

I'm trying to figure if it's NationBuilder's API, my app or Heroku that are causing this discrepancy. Am reaching out to Heroku as well and testing the app itself.

I wanted to see if anyone else has come across this and solved it?

5 reactions Share

PHP Failing to work...

Very descriptive, I know. But after running through the PHP quickstart http://nationbuilder.com/api_documentation  I get so far as obtaining the code, but when trying to get an access token it returns a 400 bad request error with the message: "Your browser sent a request that this server could not understand."

This is all code provided by nationbuilder, so what went wrong? Is there anything I need to know before starting? I set up an app. It is set to public. It currently says "in review" for status but I see no mention of this mattering in the docs. 

This is the code:

require('src/OAuth2/Client.php');
require('src/OAuth2/GrantType/IGrantType.php');
require('src/OAuth2/GrantType/AuthorizationCode.php');


$client_id = 'xxxxxx'; //obviously i use the real id and key
$key = 'xxxxxx';

$client = new OAuth2\Client($client_id, $key);

$redirectUrl = 'http://www.some-site.com/oauth.php';

$authorizeUrl = 'https://xxx.nationbuilder.com/oauth/authorize';
/*

running this gives the code below.
$authUrl = $client->getAuthenticationUrl($authorizeUrl, $redirectUrl);

echo $authUrl;

*/
$code = 'xxxxxx';

$accessTokenUrl = 'https://xxx.nationbuilder.com/oauth/token';
$params = array('code' => $code, 'redirect_uri' => $redirectUrl);
$response = $client->getAccessToken($accessTokenUrl, 'authorization_code', $params);
$token = $response['result']['access_token'];
print_r($response);

 

Did I miss something? Or does someone have a more complete example to try?

3 reactions Share

New turf cutter not displaying geocoded people

I added people to my nation using the People API.

 

Checking their records shows they've been geocoded (mostly to an exact address). The only address for each person is the Registered Address, which is their Primary Address.

 

After adding to a list and viewing on the NEW turf cutter there are no people to view. Furthermore, when using the legacy turf cutter I _can_ see the people there.

 

Can you please explain to me what is going wrong? I'm concerned with relying on a legacy feature for our future use.

 

Many thanks,

Andre

Add your reaction Share

Mark Donation as Refunded

After a credit card donation has been added as successful to a person, is there a method to update it to indicate that it was refunded or voided.

I tried setting canceled_at and failed_at to a date.  I also tried removing the value for succeeded_at (which leads to some unusual and misleading error messages)

The only method I have seen that "sort of" works, is to delete the donation.  But then there is no record of it at all.  Is deletion the only option I have?

1 reaction Share

install application

It seems  a silly question to ask, but I do not quite understand how works your applications directory. I am looking at the directory and when I click on "Get started now" it just redirect to some web site. I thought it should start some sort of a dialog to generate an authorization request.

Add your reaction Share

API Authentication STEP 3 ambiguity

 

3. Record the code that comes back

We will redirect him/her to your redirect_uri with a code parameter in its query string, so a request will come through like this:

GET http://www.myapp.com/oauth_callback?code=...

 

There is a minor problem/inconvenience with that process. When client clicked on the authorization url and you redirected a request to the application callback with the code, there is no information who authorized that.

This is probably OK for entirely manual registration, however it would be really helpful to attach a client slag '{slug}.nationbuilder.com' which I generated the Authorization request for:

GET http://www.myapp.com/oauth_callback?code=...&client={slug}.nationbuilder.com

 

 

1 reaction Share

Generate Token Duration

How long is an oAuth generated token good for?  A day, week? month? forever?

Add your reaction Share

create a person returns 302

Hello,

I am trying to create a new person via POST /api/v1/people and getting back 302 response without any other info.

This is the request  body:

{"person": { "first_name": "New", "last_name": "Person1", "phone": "1613111222", "email": "dummy@hotmail.com" } }

Please help!

7 reactions Share

Response Codes

Where is there a list of all the Response Codes?

1 reaction Share

Building a custom form with multiple tagging sections

 

I’m trying to build a custom form that will have multiple sections, that will tag people with their response. I can get the html displaying the way I want it to, and submit the form with the “text_fields”, but when it comes down to tagging people…. I’m lost!

code example,

     {% form_for signup %}   

     {% hidden_field_tag "page_id", page.id %}     

{% error_messages_for signup %}

Can you verify your information?

  • {% text_field "name", class:"text", placeholder: "name" %}
  • {% text_field "email", class:"text", placeholder: "email" %}           
  • {% text_field "submitted_address", class:"text" %}

i am A...

Check one that applies

           Democrat  

           Do Not Identify

What issues matter most to you

Check one that applies

        National Security    

         Israel

         Securing the Border             

         Issue 4

         Issue 5

         Issue 6                               

how often would you like to receive updates?

Check one that applies

         Daily

         Weekly

         Infrequently                                     

         {% submit_tag "Signup", class:"submit-button" %}

         {% endform_for %}

Any help of feedback would be AWESOME! Even a place to reference some samples.

Thanks !





2 reactions Share

Testing how to post here

This is the test )

Add your reaction Share

ID for People Tags

Is there a way to get the ID for a people tag? So that when I rename a tag, I do not need to update the tag-people relationship. Thanks. 

1 reaction Share

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?

Add your reaction Share

500 Error with PHP OAuth

I'm having an odd problem with the API. I wrote a script which was working fine in early August, but when I returned to using it I now get a 500 error when generating a token. If I make a new app, it will generate a token fine once but any repeated executions will return a 500. I haven't changed anything, and it was worked fine before. Help?

NB doesn't seem to have a good way to post code, but here's the blog post I wrote a few weeks ago with my code: http://www.richiroutreach.com/blog/working-php-and-nationbuilder-api

// OAuth 2 Library
require_once ROOT . '/OAuth2/Client.php';
require_once ROOT . '/OAuth2/GrantType/IGrantType.php';
require_once ROOT . '/OAuth2/GrantType/AuthorizationCode.php'; 

// Client ID and Secret from Nation Builder 
const CLIENT_ID = 'id';
const CLIENT_SECRET = 'secret';

// Constants we need to talk to Nation Builder
const REDIRECT_URI = "http://example.com/create_user.php";
const AUTHORIZATION_ENDPOINT = "https://xxx.nationbuilder.com/oauth/authorize"; 
const TOKEN_ENDPOINT = "https://xxx.nationbuilder.com/oauth/token";
const REQUEST_ENDPOINT = "https://xxx.nationbuilder.com/api/v1";

// Start a new OAuth2 Client 
$client = new OAuth2\Client(CLIENT_ID, CLIENT_SECRET); 

// Check if we have an authorize code, if not obtain one 
if (!isset($_GET['code'])) { 
     // Generate the URL we need to go to get the token 
     $auth_url = $client->getAuthenticationUrl(AUTHORIZATION_ENDPOINT, REDIRECT_URI); 

     // Redirect to that URL (which then sends us back to the REDIRECT_URI with a code, IE this page) 
     header('Location: ' . $auth_url); 

     // End this process 
     die('Redirect'); 
} 

// We have a code, so generate the parameters we need to get an access token 
$params = array('code' => $_GET['code'], 'redirect_uri' => REDIRECT_URI); 

// Obtain our access token 
$response = $client->getAccessToken(TOKEN_ENDPOINT, 'authorization_code', $params);
1 reaction Share

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 Share

cannot update neither contact_method_id nor call_status_id

Hello,

We are posting those fields as following, but when read back the call_status_id field does not exist or empty and contact_status_id shows  the old value.

"call_status_id": "4",

"contact_status_id": "3"

Add your reaction Share

updated_at and contacted_at issues and etc.

Hello,

We are posting update as following, however do not see the note's time-stamp as posted. The note time always says "5 days ago". Also we do not see 'contacted_by' on the page.


{

"person": {
"updated_at": "2014-08-26T14:57:16-04:00",
"last_contacted_at":"2014-08-26T14:49:27-04:00",
"last_contacted_by ": { "id": "XXX" } ,
"note_updated_at": "2014-08-26T14:49:27-04:00" ,
"note": "Hello again!"
}

}

Add your reaction Share

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 Share

Issue with PUT'ing to people via API with PHP

Hi,

 

We're using the NB people API with PHP and the adoy/oauth2 library. Recently, whenever our site makes a PUT to /api/v1/people/push, we seem to be receiving a code 400 error with no message attached. 

 

Code:

 

$payload = array(
'person' => array(
'first_name' => $first_name,
'last_name' => $last_name,
'email' => $email,
'note' => 'Sign up from web form at ' . DB::now(),
'email_opt_in' => true
)
);

 

$api_url = $baseApiUrl . '/api/v1/people/push';

$response = $client->fetch($api_url, $payload, 'PUT', array('Content-type' => 'application/json', 'Accept' => 'application/json'));

The response comes through like this:

(

    [result] => 

    [code] => 400

    [content_type] => text/plain; charset=utf-8

)

 

Can anyone point me in the direction of what isn't right here?

 

Thanks,

Sam

Add your reaction Share

How update Call/Data Entry view fields for LIsts via API

Hello,

 

I am trying to figure out how to update via API the Data Entry and Call view fields for a List.

Also what are corresponding fields in the people API?

 

Thanks.

Add your reaction Share

Reports dashboard with number count of prospects in a filter?

I'm interested in creating a status page with a live count of the number of people in a given filter.

For example: Team A is responsible for getting prospects from a specific area to join a nation.  A filter is created that shows 'joiners' from that specific area.

I want to create a page that then shows (live) the number of supporters in a specific filter.  I would then be able to show this for multiple teams to compare/contrast their progress.

In the API Explorer I saw there's something for lists (which aren't dynamic) but not filters...

Can this be done?Thanks for any help with this.

2 reactions Share

Validation Error when Setting Membership Expiration Date to NULL

I'm attempting to use the new Membership API to update membership records.  We have a class of members whose memberships do not expire, but whose membership records were erroneously given an expiration date.

When I use the API to update the membership expiration date to NULL, I throw a validation error.

PUT /people/:person_id/memberships

{
  "membership" : {
    "name" : "Standard"
    , "status" : "active"
    , "expires_on" : null
  }
}

Any thoughts on how to fix?  I'm considering just setting the expiration date 100 years in the future, but that could upset queries for members without expiration dates.

 

Add your reaction Share

Can't create a new contact; getting validation error

I'm trying to create a contact record but am getting a validation error:
HTTP POST (301.95ms) https://ertw.nationbuilder.com:443/api/v1/people/12456/contactsRequest body   {"contact":{"sender_id":3,"status":"answered","method":"door_knock","type_id":2,"note":null}} Response status   Net::HTTPBadRequest (400)Response body   {"code":"validation_failed","message":"Validation Failed.","validation_errors":["recipient_id can't be blank"]}
recipient_id is listed as an optional attribute in the docs and it seems redundant since I'm passing the recipient in the url, but I'll play along:
HTTP POST (747.43ms) https://ertw.nationbuilder.com:443/api/v1/people/12456/contactsRequest body   {"contact":{"sender_id":3,"recipient_id":12456,"status":"answered","method":"door_knock","type_id":2,"note":null}} Response status   Net::HTTPBadRequest (400)Response body   {"code":"validation_failed","message":"Validation Failed.","validation_errors":["recipient_id can't be blank"]}
I'm using code that used to work (and didn't need recipient ID). I've also tried this in the API explorer and get the same results.
Any advice?
Thanks,
Sean
1 reaction Share

People Credentials

Hello I'm wondering if there is a way to use the people credentials from a nation into my application. 
I mean, is it possible that people from my nation logs in my app with their nationbuilder credentials (user and password)? 
I saw an app called oneclickpolitics which ensures that "NationBuilder customers can very Quickly and Securely login using their NationBuilder accounts." 
How can I do that? Am I missing some functionality from the nationbuilder API? As far as I know, the people endpoint returns no credentials. 
I would really appreciate any suggestions or help.
Thank you!
2 reactions Share

POST/PUT endpoints do not work.

I'm using the NB api via PHP. The GET/DELETE methods both work but no matter what I try I can not edit or add a new people resource using the client->fetch() function.

The error code is always a 400 no matter how I format the parameters. Please help and don't give me a canned response to the API helper because I've spent 3.5 hours already trying various things in the documentation which is thin to say the least.

11 reactions Share

App Integration Leading Practices?

I'll frame this question in a general way so it applies to other 3rd party app developers, not just me:

What level of API integration are NB customers asking for?

For example, if you build a third-party app that can help members of a nation interact with each other (i.e. group chat or something else), there are several ways I can imagine that you'd want to integrate it with NB, each with a different level of complexity:

  • No integration: Just listing an app in the app directory, essentially as an ad for the app-- probably not an option.
  • Minimal integration: Include the app in an iframe and have either no sign-in requirement or require that the members of the nation sign in a second time within the app's iframe as part of the app's authentication process.
  • Deep integration: Connect to the People API so that members of a nation can sign into your app from within a NB page for that nation.
  • Other options?

Are any of those options emerging as common or recommended?  

What are NB customer expectations around 3rd party app integration?  I don't expect they'd be too happy with requiring that the members of their nation sign in twice-- once to NB and once to the app.  That's what I found with one client I worked with.

Thanks!

2 reactions Share

What kind of apps do NB clients need but do not have yet?

As a third-party app builder, I'm wondering what the NB staff hears about "apps NB customers wish they had."  

I figure this is a good question to throw out there in the open, because many of the app developers on this list could benefit from hearing some advice about the unmet needs of current NB customers.

1 reaction Share

Please give us the ability to highlight streets without bubbles!!!

All I want in the whole world right now is to have the ability to give people walk maps without bubbles, and with highlighted streets. Too many bubbles on a street makes for an almost unreadable street map. 

I've even seen walk maps with directional arrows for people. Google maps used to have a tool for this. Would this be something NB could activate or employ? 

 

 

Add your reaction Share

People API Membership Creation

I've used the People API to sync members between another system and NB but the API doesn't appear to set memberships on the new person record.  Even with membership_level_name set no corresponding membership record is created for that person.

Furthermore no error is given if a non-existent membership type is specified.  Is the people API not capable of creating memberships, am I doing it wrong, or has something changed?

2 reactions Share

OAuth Callback with App Id

When receiving the code parameter in our oauth callback page, can you also pass the nation slug and appname or client id with that code so we know which nation/app the request came from? This would allow us reuse code in many places on our side. I tried adding url parameters to my oauth callback url, but the app form would not allow it. Thanks!

 

Update: Nevermind. I can't put url params in the callback url, but I can put params in the redirect_uri to be passed back to me. Thanks!

Official response from completed

Scott, our CTO's recommendation is you use cookies to to track users and sessions - so, set a cookie when someone first lands on your site, and with each subsequent request (even redirects back to the site) they will submit the same cookie. This is the standard way that websites verify that the user behind request A and request B are the same person.

if you use Rails, you get sessions out of the box, and if your person is known to your app you can just say current_user.id or whatever and you don't need to know about cookies or sessions.
1 reaction Share

Required JSON format structor

Hi,

I am very curious as how you guys know what fields are required for any JSON format. There is no example of what is required or not. Can anybody shed some light?

Thanks.

 

Ryan

1 reaction Share

A question about Sign Up pages.

Hi All,

We use the Victory theme.The sign up demands that the single line address is filled. We don't want that as we have custom fields to collect addresses. So how do I edit the page to not require the single line address box be filled? I expect it has some thing to do with the code below. By the way we will be getting rid of any way for the members to log in.

{% if page.signup.is_all_info_collected? == false %}
                  {% if request.sorta_logged_in? %}
                    {% submit_tag "Update info", class:"submit-button" %}
                  {% else %}
                  {% submit_tag "Signup", class:"submit-button" %}
                {% endif %}
              {% endif %}
             


      
            {% endform_for %}

Add your reaction Share

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 Share

Remove Questions

I thought questions where associated with a specific Survey (given that that's how they're added via the API). But when I delete a survey the questions persist.

Is there any way to delete questions?

Add your reaction Share

Like this page to spread the word