APIs & Integrations

jjimeno
Participante | Parceiro Diamante
Participante | Parceiro Diamante

Secure Serverless function APIs

resolver

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

 

1 Solução aceita
louischausse
Solução
Conselheiro(a) de destaque | Parceiro Platinum
Conselheiro(a) de destaque | Parceiro Platinum

Secure Serverless function APIs

resolver

@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 https://github.com/HubSpot/cms-event-registration/blob/master/src/event.functions/membership.js#L21-...

Louis Chaussé from Auxilio HubSpot Solutions Partner Signature
Louis Chaussé from Auxilio HubSpot Solutions Partner Meeting link

Exibir solução no post original

7 Respostas 7
louischausse
Solução
Conselheiro(a) de destaque | Parceiro Platinum
Conselheiro(a) de destaque | Parceiro Platinum

Secure Serverless function APIs

resolver

@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 https://github.com/HubSpot/cms-event-registration/blob/master/src/event.functions/membership.js#L21-...

Louis Chaussé from Auxilio HubSpot Solutions Partner Signature
Louis Chaussé from Auxilio HubSpot Solutions Partner Meeting link
dennisedson
Equipe de Produto da HubSpot
Equipe de Produto da HubSpot

Secure Serverless function APIs

resolver

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. 

0 Avaliação positiva
louischausse
Conselheiro(a) de destaque | Parceiro Platinum
Conselheiro(a) de destaque | Parceiro Platinum

Secure Serverless function APIs

resolver

Hey @dennisedson !

Any update on this?

Louis Chaussé from Auxilio HubSpot Solutions Partner Signature
Louis Chaussé from Auxilio HubSpot Solutions Partner Meeting link
0 Avaliação positiva
dennisedson
Equipe de Produto da HubSpot
Equipe de Produto da HubSpot

Secure Serverless function APIs

resolver

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

louischausse
Conselheiro(a) de destaque | Parceiro Platinum
Conselheiro(a) de destaque | Parceiro Platinum

Secure Serverless function APIs

resolver

Hi @dennisedson,

Thanks for your reply. 

Already subscribed!

Is there a beta program that we can enroll in?

Louis Chaussé from Auxilio HubSpot Solutions Partner Signature
Louis Chaussé from Auxilio HubSpot Solutions Partner Meeting link
0 Avaliação positiva
dennisedson
Equipe de Produto da HubSpot
Equipe de Produto da HubSpot

Secure Serverless function APIs

resolver

@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 😀

0 Avaliação positiva
IBuddhika
Colaborador(a) | Parceiro Diamante
Colaborador(a) | Parceiro Diamante

Secure Serverless function APIs

resolver

Hi @dennisedson ,

 

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