Advertisement
Guest User

Untitled

a guest
Jul 28th, 2014
499
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.46 KB | None | 0 0
  1. $clientId = 'xxxx';
  2. $clientSecret = 'xxxx';
  3. $client = new OAuth2\Client($clientId, $clientSecret);
  4.  
  5. $client->setAccessToken('xxxx');
  6.  
  7. $baseApiUrl = 'https://atlanticsunrise.nationbuilder.com';
  8.  
  9. $data = array (
  10.     'person' => array (
  11.         'first_name' => 'jake',
  12.         'last_name' => 'Doe',
  13.             'email' => 'fake3@email.com'
  14.     )
  15. );
  16.  
  17. $response = $client->fetch( $baseApiUrl ."/api/v1/people" , $data, 'POST');
  18.  
  19. echo '<pre>';
  20. print_r($response);
  21. echo '</pre>';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement