# Secure Serverless function APIs

**URL:** <https://community.hubspot.com/t/secure-serverless-function-apis/27085>\
**Category:** APIs & Integrations\
**Tags:** timeline-and-extensions-apis\
**Created:** [October 22, 2020, 8:33am UTC](https://community.hubspot.com/t/secure-serverless-function-apis/27085 "2020-10-22T08:33:37Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![jjimeno](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jjimeno/32/102437_2.png) [@jjimeno](https://community.hubspot.com/u/jjimeno)\
**Post date:** [October 22, 2020, 8:33am UTC](https://community.hubspot.com/t/secure-serverless-function-apis/27085/1 "2020-10-22T08:33:37Z")

</div>

Hi guys!

Hope you are doing well.

how do we make our API from a serverless function only accessible when its called from our website but it shouldn’t be available elsewhere example Postman, etc. I’m not sure what would be a good approach? do we need to add an authentication key in the header and will be validated in the api? wont this key be exposed? thank you!

Hope someone could help!

Regards,

Jess

---

<div class="post-metadata">

**Author:** ![dennisedson](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/dennisedson/32/28044_2.png) [@dennisedson](https://community.hubspot.com/u/dennisedson)\
**Post date:** [October 22, 2020, 5:56pm UTC](https://community.hubspot.com/t/secure-serverless-function-apis/27085/2 "2020-10-22T17:56:19Z")

</div>

Hello @jjimeno ,

At this time, we do not have a good solution for limiting the access. It has been mentioned several times and we are investigating so stay tuned.

---

<div class="post-metadata">

**Author:** ![louischausse](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/louischausse/32/18067_2.png) [@louischausse](https://community.hubspot.com/u/louischausse)\
**Post date:** [May 28, 2021, 8:45pm UTC](https://community.hubspot.com/t/secure-serverless-function-apis/27085/3 "2021-05-28T20:45:17Z")

</div>

Hey @dennisedson !  
Any update on this?

---

<div class="post-metadata">

**Author:** ![dennisedson](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/dennisedson/32/28044_2.png) [@dennisedson](https://community.hubspot.com/u/dennisedson)\
**Post date:** [June 1, 2021, 2:30pm UTC](https://community.hubspot.com/t/secure-serverless-function-apis/27085/4 "2021-06-01T14:30:27Z")

</div>

Not yet. I imagine there would be an announcement for something like this so if you haven’t already, sign up for the [developer changelog](https://developers.hubspot.com/changelog)

---

<div class="post-metadata">

**Author:** ![louischausse](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/louischausse/32/18067_2.png) [@louischausse](https://community.hubspot.com/u/louischausse)\
**Post date:** [June 1, 2021, 2:45pm UTC](https://community.hubspot.com/t/secure-serverless-function-apis/27085/5 "2021-06-01T14:45:10Z")

</div>

Hi @dennisedson,  
Thanks for your reply.  
Already subscribed!  
Is there a beta program that we can enroll in?

---

<div class="post-metadata">

**Author:** ![dennisedson](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/dennisedson/32/28044_2.png) [@dennisedson](https://community.hubspot.com/u/dennisedson)\
**Post date:** [June 2, 2021, 3:52pm UTC](https://community.hubspot.com/t/secure-serverless-function-apis/27085/6 "2021-06-02T15:52:29Z")

</div>

@louischausse , I will look into it. (I don’t think there is, yet)

Will reach out directly if one exists. Feel free to occasionally nudge me 😀

---

<div class="post-metadata">

**Author:** ![IBuddhika](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/ibuddhika/32/29572_2.png) [@IBuddhika](https://community.hubspot.com/u/IBuddhika)\
**Post date:** [July 25, 2022, 4:43pm UTC](https://community.hubspot.com/t/secure-serverless-function-apis/27085/7 "2022-07-25T16:43:11Z")

</div>

Hi @dennisedson ,

Is there any update for this? I guess it’s really an important feature to have.

---

<div class="post-metadata">

**Author:** ![louischausse](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/louischausse/32/18067_2.png) [@louischausse](https://community.hubspot.com/u/louischausse)\
**Post date:** [June 2, 2021, 6:51pm UTC](https://community.hubspot.com/t/secure-serverless-function-apis/27085/8 "2021-06-02T18:51:05Z")

</div>

@dennisedson  
As we found in Dev Slack, a way to handle that is to check whether the contact exists and is logged in the function. An example of this is [cms-event-registration/src/event.functions/membership.js at master · HubSpot/cms-event-registration · GitHub](https://github.com/HubSpot/cms-event-registration/blob/master/src/event.functions/membership.js#L21-L29)
