<p>I need to get blog posts from hubspot api using this approach. 
<a href="http://developers.hubspot.com/docs/methods/blogv2/get_blog_posts" rel="nofollow">http://developers.hubspot.com/docs/methods/blogv2/get_blog_posts</a></p>

<p>Since craft uses twig I'm unable to use php in the templates, so I thought I could just use jQuery getJson but this causes a cross origin request blocked error.</p>

<p>So is creating a plugin and using php my only option to get json results from an api call?</p>

<p>Has anyone used hubspot api?</p>

<templating><json>
Best solution for get json results from third party api?
# Best solution for get json results from third party api?

(Asked by: username_0 on 2015-05-06)

I need to get blog posts from hubspot api using this approach.
<http://developers.hubspot.com/docs/methods/blogv2/get_blog_posts>

Since craft uses twig I'm unable to use php in the templates, so I thought I could just use jQuery getJson but this causes a cross origin request blocked error.

So is creating a plugin and using php my only option to get json results from an api call?

Has anyone used hubspot api?

**Tags:** templating, json

---

## 0 answers

