# How can I call third party apis in discourse

**URL:** https://meta.discourse.org/t/how-can-i-call-third-party-apis-in-discourse/201782
**Category:** Development
**Created:** [August 26, 2021, 11:06am UTC](https://meta.discourse.org/t/how-can-i-call-third-party-apis-in-discourse/201782 "2021-08-26T11:06:01Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [August 26, 2021, 11:42am UTC](https://meta.discourse.org/t/how-can-i-call-third-party-apis-in-discourse/201782/4 "2021-08-26T11:42:08Z")

</div>

Use the backend to make the call:

- if you need this to be secure,
- if you need the backend to process the result
- if the call(s) may be long running

If long running put it in a Job.

That will require some Ruby in a Plugin and one of the above mentioned gems.

It’s not necessarily all that easy to get into Discourse plugin development, it’s a big complex, opinionated platform, but there are [good official guides](https://meta.discourse.org/tag/plugin-guides) on here and LOTS of existing open source plugins to look through (see #Customization > Plugin and links to github). Try to find one that does something similar and look at how it is solved in code.

If it’s superficial consider a Theme Component. Look at the [Theme Development guides](https://meta.discourse.org/t/developer-s-guide-to-discourse-themes/93648) on here.

Look at examples, like this one: [discourse-tc-quote-of-the-day/get-quote.js.es6 at master · merefield/discourse-tc-quote-of-the-day (github.com)](https://github.com/merefield/discourse-tc-quote-of-the-day/blob/master/javascripts/discourse/lib/get-quote.js.es6)

---

_[View the full topic](https://meta.discourse.org/t/how-can-i-call-third-party-apis-in-discourse/201782)._
