# Make requests to the Discourse API with Zapier

**URL:** <https://meta.discourse.org/t/make-requests-to-the-discourse-api-with-zapier/122126>\
**Category:** Integrations\
**Tags:** rest-api, how-to, tasks, zapier\
**Created:** [July 4, 2019, 11:40pm UTC](https://meta.discourse.org/t/make-requests-to-the-discourse-api-with-zapier/122126 "2019-07-04T23:40:55Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![Nacho\_Caballero](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nacho_caballero/32/130189_2.png) [@Nacho\_Caballero](https://meta.discourse.org/u/Nacho_Caballero)\
**Post date:** [December 2, 2019, 11:12pm UTC](https://meta.discourse.org/t/make-requests-to-the-discourse-api-with-zapier/122126/8 "2019-12-02T23:12:54Z")

</div>

OK, I figured out what I needed to do:

1. Install [`cors-anywhere`](https://github.com/Rob--W/cors-anywhere) locally and run the server
2. Modify the request to include the reverse proxy before the API endpoint and call the `json` method in the [Fetch Response object](https://developer.mozilla.org/en-US/docs/Web/API/Body/json):

```js
await (fetch("http://localhost:8080/mycommunity.com/g.json", {
  headers: {
    "Api-Username": Secret("DISCOURSE_USERNAME"),
    "Api-Key": Secret("DISCOURSE_KEY")
  },
})).json()

```

---

_[View the full topic](https://meta.discourse.org/t/make-requests-to-the-discourse-api-with-zapier/122126)._
