# Want to learn about notecard inbound requests

**URL:** <https://discuss.blues.com/t/want-to-learn-about-notecard-inbound-requests/1965>\
**Category:** Notehub.io\
**Created:** [February 18, 2024, 5:46pm UTC](https://discuss.blues.com/t/want-to-learn-about-notecard-inbound-requests/1965 "2024-02-18T17:46:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ujur007](https://avatars.discourse-cdn.com/v4/letter/u/e9bcb4/32.png) [@ujur007](https://discuss.blues.com/u/ujur007)\
**Post date:** [February 18, 2024, 5:46pm UTC](https://discuss.blues.com/t/want-to-learn-about-notecard-inbound-requests/1965/1 "2024-02-18T17:46:24Z")

</div>

Hi,

I want to send a HTTP request from third party cloud platform such as Ubidots, datacake etc to [notehub.io](http://notehub.io) and eventually to notecard. Can someone guide me on that?

The documentation states that bearer token is required for that, which expires every 30 minutes, so then new token will need to be generated.

> **[Inbound Requests & Shared Data - Blues Developers](https://dev.blues.io/notecard/notecard-walkthrough/inbound-requests-and-shared-data/)**
>
> All of the scenarios discussed so far in this guide are focused on performing requests directly against the Notecard from a host, and synching data from the Notecard to Notehub.

After getting the token a request can be send with payload to the notehub. So in total there are two requests that needs to be sent…first to get the access token and second to send the payload with the data…

Has anyone done something like this before?

---

<div class="post-metadata">

**Author:** ![RobLauer](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.blues.com/roblauer/32/1567_2.png) [@RobLauer](https://discuss.blues.com/u/RobLauer)\
**Post date:** [February 19, 2024, 1:07am UTC](https://discuss.blues.com/t/want-to-learn-about-notecard-inbound-requests/1965/2 "2024-02-19T01:07:02Z")

</div>

Hi @ujur007,

You’re exactly correct:

1. You’ll need to acquire a [fresh bearer token](https://dev.blues.io/api-reference/notehub-api/api-introduction/#authentication-with-oauth-bearer-tokens) every 30 minutes.
2. Create a new inbound Note - for example, using the `bash` example provided in the [note.add API docs](https://dev.blues.io/api-reference/notecard-api/note-requests/#note-add):

```auto
curl -X POST 
-L 'https://api.notefile.net/v1/projects/<projectUID>/devices/<deviceUID>/notes/<file>/<note>' 
-H 'Authorization: Bearer <access_token>' 
-d '{"body": {"temp": 72.22 }}'

```

---

<div class="post-metadata">

**Author:** ![ujur007](https://avatars.discourse-cdn.com/v4/letter/u/e9bcb4/32.png) [@ujur007](https://discuss.blues.com/u/ujur007)\
**Post date:** [February 21, 2024, 12:01pm UTC](https://discuss.blues.com/t/want-to-learn-about-notecard-inbound-requests/1965/3 "2024-02-21T12:01:21Z")

</div>

Hi @RobLauer  
Thanks for confirming.  
Actually, I need to learn further regarding the HTTP request and response and receive some data.

For example, I want to automate this process on particular cloud platform, I would have to write some customs functions to do so(As GUI based web-hooks are not enough).

I wanted to confirm this. As cloud platforms are new things to me…

Here is a link to Ubidots customs functions

> **[Analytics: UbiFunctions User Guide | Ubidots Help Center](https://help.ubidots.com/en/articles/2132086-analytics-ubifunctions-user-guide)**
>
> Use UbiFunctions serverless computation environment to extract, transform, schedule, and analyze data.

---

<div class="post-metadata">

**Author:** ![RobLauer](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.blues.com/roblauer/32/1567_2.png) [@RobLauer](https://discuss.blues.com/u/RobLauer)\
**Post date:** [February 21, 2024, 5:40pm UTC](https://discuss.blues.com/t/want-to-learn-about-notecard-inbound-requests/1965/4 "2024-02-21T17:40:28Z")

</div>

Yep, this looks like you’d have to use their “UbiFunctions” interface (I don’t have experience with this though). It may be helpful to use the [Notehub JS Library](https://dev.blues.io/tools-and-sdks/notehub-js-library/#notehub-js-library-overview) if you are developing a node function.
