Access Denied You do not have permission to access "http://api.hubapi.com/content/api/v2/blog-posts?"


#1

Hello,

I have problems to publish the list of messages on our external website wordpress, nothing is displayed. The error message when I make an echo of the JSON file: Access denied You are not allowed to access "http://api.hubapi.com/content/api/v2/blog-posts?" On this server. Reference # 18.4f29f7c1.1480506943.4ed70c16 Here is the url that I use to retrieve the JSON file:

https://api.hubapi.com/content/api/v2/blog-posts?hapikey=XXXXXX&limit=4&order_by=-publish_date&state=PUBLISHED&content_group_id=4275732411

Of course I replace the X by a real key :wink:

It works manually but not my PHP function from my external server.

My fonction :

$url_get_posts_inbound = ‘https://api.hubapi.com/content/api/v2/blog-posts?hapikey=XXXXXX&limit=4&order_by=-publish_date&state=PUBLISHED&content_group_id=4275732411’;

$ch = curl_init();
curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, true);

curl_setopt ($ch, CURLOPT_URL, $url_get_posts_inbound);
$json = curl_exec($ch);
curl_close($ch);

$obj = json_decode($json);
$objects = $obj->{“objects”};


#2

Sorry for the inconvenience but it’s not even today it’s coming back! Cool even though I do not know what the problem was. :slight_smile: