If you're using HubSpot Developer Projects - currently used for building UI Extensions and for the CMS React Beta we're introducing a new project version. To get the updates you'll need to update the platform version in your project config file.
This new version comes with feature and developer experience enhancements, by updating your platformVersion
in your project configuration file you can opt in when it's convenient for your team.
App functions are getting a number of developer experience updates.
PRIVATE_APP_ACCESS_TOKEN
has been moved from context.secrets to be accessed from process.env
instead.Open your hsproject.json file, it should look like this. (if yours does not show a "platformVersion" that's okay, you'll be adding it.)
You'll be updating or adding the platformVersion number "2023.2"
In your serverless function files you'll need to update how you're grabbing the private app token. Update references to context.secrets.PRIVATE_APP_ACCESS_TOKEN
to process.env.PRIVATE_APP_ACCESS_TOKEN
Additionally if you have any, CMS endpoint functions will need to be converted to App Functions.
If you want to update your functions to be asynchronous we have guidance for that as well.
Questions or comments? Join us in our developer community forums.