Skip to main content

Activity

commented on create a person returns 302
Im getting:
{
result: "",
code: 302,
content_type: “text\/html”
}
In PHP using the OAuth2 Plugin used in the docs.

$baseApiUrl = ‘https://’.$input[‘nation’].‘.nationbuilder.com?access_token=’ . $nation->accessKey;

$peopleDecoratedInput = array(
‘person’ => array(
‘home_address’ => array(
‘address1’ => $input[‘streetNum’].’ ‘.$input[’street’],
‘city’ => $input[‘city’],
‘state’ => $input[‘state’],
‘zip’ => $input[‘zip’],
‘country_code’ => $input[‘country_code’]
),
‘first_name’ => $input[‘fName’],
‘last_name’ => $input[‘lName’],
‘phone’ => $input[‘phoneNum’],
‘email’ => $input[‘email’],
‘pointPerson’ => $input[‘pointPerson’],
‘support_level’ => $input[‘supportLevel’]
)
);

$response = $client->fetch(
$baseApiUrl . ‘/api/v1/people’,
$peopleDecoratedInput,
POST’,
array(‘Content-type’ => ‘application/json’, ‘Accept’ => ‘application/json’),
0
);
posted 2014-10-19 13:53:00 -0700