August 7th Roundup: 5 New Updates

August 7, 2019

For this post we rolled 5 updates into one with a new header to help with Webhook validation, a new callback for embedded forms, added flexibility for content developers, a number of documentation updates, and a small update to the Developer’s Terms of Service. 

Now Live: Webhook signature versioning

What’s happening?

Starting today, we're including an additional header with any requests sent from HubSpot. This header, named X-HubSpot-Signature-Version, will indicate which version of the signature is included in this request. This new header will make it easier to determine which method should be used to validate the request signature included in the X-HubSpot-Signature header. This will also make it possible to programmatically determine which validation method should be used for any given request.

This header will be included for requests sent by HubSpot, including requests made for webhooks, CRM Extensions, and Workflow Extensions.

What’s changing?

Please note: The method used to validate the request signature is not changing for any requests. The existing method that you're using to validate the signature should still be used for any requests you're currently receiving from HubSpot. This change only adds an additional header that can be used to programmatically determine which validation method should be used.

The signature versions are defined as follows:

  • v1 - an SHA-256 hash built using the client secret of your app and the request body - Used with webhooks.
  • v2 - an SHA-256 hash built using the client secret of your app, the HTTP method, request URI, and request body - Used with CRM Extensions and Workflow Extensions.

When is this happening?

This new header is currently live.

If you have any questions please let us know by replying to this forum thread.

New Feature - onFormSubmitted callback function for embedded forms

What’s happening?

We are adding a new onFormSubmitted callback function to the advanced form options. This callback will fire after form submission data has been accepted by HubSpot, allowing you to perform an action when the submission is fully complete, such as displaying a confirmation or thank you message.

This differs from the onFormSubmit callback, which is triggered during the submission process, but fires before the data has been sent to HubSpot.

When is this happening?

This feature is live today.

If you have any questions, please join the discussion in the community

New Feature: Support for relative file path references

What is happening?

The HubSpot CMS now supports relative path references for HTML, CSS and JavaScript files, in addition to Modules. This allows developers to reference files based on where they live in a project. 

Relative paths should always begin with a period ".", to denote they are not absolute paths, which should always begin with a slash "/".

Relative references support the ".." and "." delimiters in paths. Use ".." to go up a level in a project, and "." to stay in the current level of a project. 

Example usage:

Relative Paths Examples

As a best practice, all absolute paths should begin with a slash. If they do not, the Design Manager will throw a warning. 

When is this happening?

This feature is live now.

If you have any questions, join the discussion in the community

 

Documentation Updates

We've recently made updates to some of our documentation to reflect some missing or incorrect functionality.  For all of these updates, no functionality is actually changing at this time, only the documentation has been updated with correct information.

CRM Objects API and the propertiesWithHistory parameter

For the Tickets, Products, and Line Items APIs, the propertiesWithHistory parameter is now supported when pulling these records. This parameter can be included in the request URL to pull the current and historical values for the specified property, and works the same as the already documented parameter from the Companies API.

The following documentation pages have been updated to include support for the propertiesWithHistory parameter:

https://developers.hubspot.com/docs/methods/tickets/get-all-tickets

https://developers.hubspot.com/docs/methods/tickets/get_ticket_by_id

https://developers.hubspot.com/docs/methods/tickets/get-batch-tickets-by-id

https://developers.hubspot.com/docs/methods/products/get-all-products

https://developers.hubspot.com/docs/methods/products/get_product_by_id

https://developers.hubspot.com/docs/methods/products/batch-get-products

https://developers.hubspot.com/docs/methods/line-items/get-all-line-items

https://developers.hubspot.com/docs/methods/line-items/get_line_item_by_id

https://developers.hubspot.com/docs/methods/line-items/batch-get-line-items



Ecommerce Bridge and sync errors

The "GET /extensions/ecomm/v2/sync/errors/portal" endpoint for the Ecommerce Bridge V2 previously indicated that it could be used with an OAuth Access token to get the sync errors for the specific HubSpot account from the specific app associated with the access token. This was incorrect, as the endpoint only supports custom integrations using API keys.

We've released a separate endpoint that does have the ability to use an OAuth access token, that will let you get the sync errors for a specific account from a specific app that is associated with the provided access token:

https://developers.hubspot.com/docs/methods/ecommerce/v2/get-all-sync-errors-for-an-app-and-account

Marketing Email API and the workflowNames field

When getting the details or statistics for a specific email, a field named workflowNames was previously returned. This field would only be set to an empty list, and as a result was removed from the response.

The following documentation pages have been updated to reflect that the field is no longer included in the response:

https://developers.hubspot.com/docs/methods/cms_email/get-the-statistics-for-a-marketing-email

https://developers.hubspot.com/docs/methods/cms_email/get-the-details-for-a-marketing-email


As mentioned above, no functionality is actually changing at this time, these are only documentation updates being made to reflect current functionality.

If you have any questions, join the discussion in the community

Developer Terms Update

Developer terms have now been updated to state explicitly that limits may need to change with or without notice. You can read the full terms at https://legal.hubspot.com/hubspot-developer-terms

If you have any questions, join the conversation in the community