# How to Work With API

**URL:** <https://forum.rasa.com/t/how-to-work-with-api/5305>\
**Category:** Rasa Open Source\
**Created:** [February 19, 2019, 4:23am UTC](https://forum.rasa.com/t/how-to-work-with-api/5305 "2019-02-19T04:23:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![developer](https://avatars.discourse-cdn.com/v4/letter/d/bcef8e/32.png) [@developer](https://forum.rasa.com/u/developer)\
**Post date:** [February 19, 2019, 4:23am UTC](https://forum.rasa.com/t/how-to-work-with-api/5305/1 "2019-02-19T04:23:56Z")

</div>

I start working in my bot which is under Rasa platform, i really reach the final work.

The problem for me now is that i have to make the bot to understand my active directory, so when i ask him about any number of any employee in my organization, he should response to give me, i have the data in an API that i have create it and now i have the HTTP link for that API, the work need is to connect this API to my bot!!! how to do that? can any one help me?

---

<div class="post-metadata">

**Author:** ![srikar\_1996](https://avatars.discourse-cdn.com/v4/letter/s/e274bd/32.png) [@srikar\_1996](https://forum.rasa.com/u/srikar_1996)\
**Post date:** [February 19, 2019, 11:55am UTC](https://forum.rasa.com/t/how-to-work-with-api/5305/2 "2019-02-19T11:55:04Z")

</div>

You can trigger a custom action for that and call your API to query your db from there. You can find information about custom actions here: [actions](https://rasa.com/docs/core/customactions/)

---

<div class="post-metadata">

**Author:** ![developer](https://avatars.discourse-cdn.com/v4/letter/d/bcef8e/32.png) [@developer](https://forum.rasa.com/u/developer)\
**Post date:** [February 20, 2019, 4:12am UTC](https://forum.rasa.com/t/how-to-work-with-api/5305/3 "2019-02-20T04:12:17Z")

</div>

i do that for weather API which comes as Key, but i need a clear instruction aboutt how to do that for HTTP API?

---

<div class="post-metadata">

**Author:** ![ypk46](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/ypk46/32/1981_2.png) [@ypk46](https://forum.rasa.com/u/ypk46)\
**Post date:** [February 20, 2019, 4:51pm UTC](https://forum.rasa.com/t/how-to-work-with-api/5305/4 "2019-02-20T16:51:46Z")

</div>

You can use the **[Requests](http://docs.python-requests.org/en/master/)** library inside a custom action to make calls to your HTTP API.

It could be something like:

```
r = requests.get('https://my-company.com/api/employee/<Employee Number>')
```
