Hello,
I am currently working on a custom theme using the hubspot cms. In this theme users will have tasks they complete, with their progress for each task being stored as a property in their contact record. Something that this theme needs to do is dynmically populate these user properties based on the tasks.
So if a person using this theme creates a new task, the system will need to check if the contact has a property for that task, and if so update it/if not, create it.
My question is what would be best practice for storing the api key? I using these guides as a reference on creating new properties/updating them based on specific user actions - https://developers.hubspot.com/docs/methods/contacts/v2/create_contacts_property
https://developers.hubspot.com/docs/methods/contacts/v2/update_contact_property
Thanks
@DavidFJones you could store it in a HubL variable and it should be safe from the public. However, anyone that has access to the design manager would be able to easily find it. I don’t know if you can even really do anything with a HubSpot API from within a HubSpot theme anyway just because you can’t do a server side POST request as far as I know besides just using a normal HubSpot form or running your own server. Anyway, hope that helps.
So after seeing your response, and looking into the limitations a bit more what I want to be able to do with it will require the use of serverless functions to achieve the functionality I’m looking for.
Thank you for the help.