# New to farmOS and need help with api

**URL:** <https://farmos.discourse.group/t/new-to-farmos-and-need-help-with-api/1759>\
**Category:** Using farmOS\
**Created:** [September 21, 2023, 8:35am UTC](https://farmos.discourse.group/t/new-to-farmos-and-need-help-with-api/1759 "2023-09-21T08:35:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![PaulC](https://avatars.discourse-cdn.com/v4/letter/p/e9a140/32.png) [@PaulC](https://farmos.discourse.group/u/PaulC)\
**Post date:** [September 21, 2023, 8:35am UTC](https://farmos.discourse.group/t/new-to-farmos-and-need-help-with-api/1759/1 "2023-09-21T08:35:36Z")

</div>

Hi all, I’m new to farmOS. I’ve been given the task of taking over maintaining a farmOS site which has recently been migrated to a Ubuntu server.

The users stated they had an SMS service for texting to a number and they could log the number of eggs. Well since this has been migrated this feature no longer works and I have been thrown in the deep end.

I’ve been given access to a twilio service and told there you go. I have no idea where to even start, any help would be very appreciated.

---

<div class="post-metadata">

**Author:** ![Farmer-Ed](https://yyz2.discourse-cdn.com/free1/user_avatar/farmos.discourse.group/farmer-ed/32/662_2.png) [@Farmer-Ed](https://farmos.discourse.group/u/Farmer-Ed)\
**Post date:** [September 21, 2023, 10:41am UTC](https://farmos.discourse.group/t/new-to-farmos-and-need-help-with-api/1759/2 "2023-09-21T10:41:17Z")

</div>

Hi @PaulC welcome to the forum.

Is this farmOS 1.x or 2.x ? I remember someone on here having the same setup on 1.x

I know nothing about twilio, but I have played with a similar idea using Telegram and Node-Red.  
 ![8bfa3bdf435139891ad5e91118d69e9a578a3a6b.gif](https://global.discourse-cdn.com/free1/uploads/farm_os/original/1X/8bfa3bdf435139891ad5e91118d69e9a578a3a6b.gif)

With Telegram it can be a little more interactive than SMS using a bot.

Have you any access to the previous code used? or What language are you planning on using?

---

<div class="post-metadata">

**Author:** ![paul121](https://avatars.discourse-cdn.com/v4/letter/p/54ee81/32.png) [@paul121](https://farmos.discourse.group/u/paul121)\
**Post date:** [September 22, 2023, 5:01pm UTC](https://farmos.discourse.group/t/new-to-farmos-and-need-help-with-api/1759/3 "2023-09-22T17:01:21Z")

</div>

Welcome @PaulC !

I think this might be the original code? Found by searching @Skipper here on the forum and Github 🙂 [GitHub - Skipper-is/SMS-Egg-Logger: A TTGO T-Call ESP32 based egg recording platform for FarmOS](https://github.com/Skipper-is/SMS-Egg-Logger)

Seems like this worked by having a device actually receive the SMS text, process it in Python, and send to a PHP script (hosted elsewhere? maybe/maybe not on the farmOS server?) that then made the farmOS API request. As you mention this was also the v1 API.

I’m not familiar with Twilio, but using a service like this should eliminate the hardware/SMS processing complexity from the previous implementation. If Twilio can be configured to send an API request when receiving texts then maybe two options:

1. Make a farmOS v2 module that exposes a custom API for receiving the Twilio request
2. Use node-red as an intermediary service to receive Twilio request, add some processing logic & use the standard farmOS JSON:API

Telegram/chat looks promising too 🙂

---

<div class="post-metadata">

**Author:** ![Skipper](https://avatars.discourse-cdn.com/v4/letter/s/839c29/32.png) [@Skipper](https://farmos.discourse.group/u/Skipper)\
**Post date:** [September 22, 2023, 5:28pm UTC](https://farmos.discourse.group/t/new-to-farmos-and-need-help-with-api/1759/4 "2023-09-22T17:28:07Z")

</div>

I used Twillio in the end, as the internet was too unreliable for my ESP32. There was another API that was hosted separately, and that could access farmOS API over Curl
