# Best way to call external API in SLIM

**URL:** <https://discourse.slimframework.com/t/best-way-to-call-external-api-in-slim/860>\
**Category:** Questions\
**Created:** [October 29, 2016, 7:36pm UTC](https://discourse.slimframework.com/t/best-way-to-call-external-api-in-slim/860 "2016-10-29T19:36:51Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ashickur-noor](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.slimframework.com/ashickur-noor/32/189_2.png) [@ashickur-noor](https://discourse.slimframework.com/u/ashickur-noor)\
**Post date:** [October 29, 2016, 7:36pm UTC](https://discourse.slimframework.com/t/best-way-to-call-external-api-in-slim/860/1 "2016-10-29T19:36:51Z")

</div>

In my SLIM app I need to call external API. What is the best practice to do so? Better if I get some example 🙂 .

---

<div class="post-metadata">

**Author:** ![akrabat](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.slimframework.com/akrabat/32/9_2.png) [@akrabat](https://discourse.slimframework.com/u/akrabat)\
**Post date:** [October 29, 2016, 7:52pm UTC](https://discourse.slimframework.com/t/best-way-to-call-external-api-in-slim/860/2 "2016-10-29T19:52:23Z")

</div>

Use [Guzzle](https://github.com/guzzle/guzzle).

---

<div class="post-metadata">

**Author:** ![TheLobos](https://avatars.discourse-cdn.com/v4/letter/t/e9bcb4/32.png) [@TheLobos](https://discourse.slimframework.com/u/TheLobos)\
**Post date:** [October 29, 2016, 8:16pm UTC](https://discourse.slimframework.com/t/best-way-to-call-external-api-in-slim/860/3 "2016-10-29T20:16:10Z")

</div>

Guzzle is nice, curl is another option.

---

<div class="post-metadata">

**Author:** ![ashickur-noor](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.slimframework.com/ashickur-noor/32/189_2.png) [@ashickur-noor](https://discourse.slimframework.com/u/ashickur-noor)\
**Post date:** [October 30, 2016, 6:29am UTC](https://discourse.slimframework.com/t/best-way-to-call-external-api-in-slim/860/4 "2016-10-30T06:29:15Z")

</div>

Can you give me some some sample code? I search in web but nothing helpful found.

---

<div class="post-metadata">

**Author:** ![tflight](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.slimframework.com/tflight/32/1205_2.png) [@tflight](https://discourse.slimframework.com/u/tflight)\
**Post date:** [October 30, 2016, 2:37pm UTC](https://discourse.slimframework.com/t/best-way-to-call-external-api-in-slim/860/5 "2016-10-30T14:37:50Z")

</div>

- [Guzzle Documentation - Quickstart](http://docs.guzzlephp.org/en/latest/quickstart.html) (offical docs)
- [Making HTTP Requests with Guzzle](http://wern-ancheta.com/blog/2016/01/20/making-http-requests-with-guzzle/) (tutorial/example)
- [Crash Course of Wunderlist’s API with Guzzle](https://www.sitepoint.com/crash-course-of-wunderlists-api-with-guzzle/) (tutorial/example)
