Created
September 9, 2015 21:07
-
-
Save drmmr763/7655827234f11f417dda to your computer and use it in GitHub Desktop.
hubspot.api
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
<?php | |
$query = array( | |
'refresh_token' => 'xxx', // $this->keys['refresh_token'], | |
'client_id' => 'yyy', //$this->keys[$this->getClientIdKey()], | |
'grant_type' => 'refresh_token', | |
); | |
$url = 'https://api.hubapi.com/auth/v1/refresh?' . http_build_query($query); | |
$ch = curl_init(); | |
$headers = array('Content-Type: application/x-www-form-urlencoded'); | |
curl_setopt($ch, CURLOPT_HEADER, true); | |
curl_setopt($ch, CURLOPT_POST, 1); | |
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); | |
curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); | |
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); | |
curl_setopt($ch, CURLOPT_POSTFIELDS, array()); | |
curl_setopt($ch, CURLOPT_URL, $url); | |
$result = curl_exec($ch); | |
var_dump($result); | |
exit(); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment