APIs & Integrations

SAPikachu
Member

Internal error when calling API to update a template

I have created an integration to update a javascript template with generated content. It works fine in the past, but recently it stopped working. Here is a sample request and response:

PUT https://api.hubapi.com/content/api/v2/templates/4135108947?hapikey=[reducted]&portalId=464889 HTTP/1.1
Host: api.hubapi.com
Content-Type: application/json
Content-Length: 15

{"source": "x"}
HTTP/1.1 500 Internal Server Error
Access-Control-Allow-Credentials: false
Cache-Control: No-store
Content-Type: text/html; charset=utf-8
P3P: P3P: policyref="http://www.hubspot.com/w3c/p3p.xml", CP="CURa ADMa DEVa TAIa PSAa PSDa OUR IND DSP NON COR
Pragma: 1489661027478
Server: gunicorn/0.17.2
X-HS-MC-Reqs: Z2V0OjIsMg==
x-last-modified: Thu, 16 Mar 2017 10:43:47 GMT
x-last-modified-timestamp: 1489661027478
Content-Length: 42
Date: Thu, 16 Mar 2017 10:43:47 GMT
Connection: close

{"message": "There was an internal error"}

Is there anything we need to change to fix this? My portal is 464889, thank you very much.

0 Upvotes
4 Replies 4
AAlsalkhadi
Contributor | Platinum Partner
Contributor | Platinum Partner

Internal error when calling API to update a template

Hey @SAPikachu@Dadams@karstenkoehler@tjoyce , @Anton,

has anyone figured out what the problem is? did anyone know, how to solve this problem?



I have a problem similar to this and was thinking of using JavaScript on, say, a landing page to achieve the expected behavior and then sending the rendered HTML to the email template. 


Thank you very much

0 Upvotes
Dadams
HubSpot Employee
HubSpot Employee

Internal error when calling API to update a template

Hi @SAPikachu

Are you still seeing this issue? I’m not seeing any issues with this when testing that exact data with any templates I tried this with on a test portal. If you are, can you also send me the template ID you’re seeing this with?

0 Upvotes
SAPikachu
Member

Internal error when calling API to update a template

@dadams Thanks for the reply. I just checked and still saw this issue. ID of the template I used to test is 4135108947, this is the template we are using in a page. I also tested on another test template (4697950532), with the same result.

0 Upvotes
Dadams
HubSpot Employee
HubSpot Employee

Internal error when calling API to update a template

I’ll need some other details for this, I’ll reach out to you directly.