Last active
March 18, 2019 14:34
-
-
Save philfreo/5406540 to your computer and use it in GitHub Desktop.
POST HTTP request with JSON in PHP
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$lead = array('name' => 'test'); | |
$headers = array('Content-Type' => 'application/json'); | |
$options = array('auth' => array('YOUR_API_KEY', '')); | |
$request = Requests::post('https://api.close.com/api/v1/lead/', $headers, json_encode($lead), $options); |
Any plans on making a real PHP client/lib?
We aren't currently working on official per-language client libraries but there are 2 unofficial libraries you can check out, if you want something beyond a simple REST wrapper:
https://github.com/loopline-systems/closeio-api-wrapper
https://github.com/TheDeveloper/closeio-php-sdk
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Assumes Requests is installed.