<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Issue with Template API in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/Issue-with-Template-API/m-p/268589#M24204</link>
    <description>&lt;P&gt;Ok, I found a solution.&lt;BR /&gt;&lt;BR /&gt;Used the &lt;A href="https://www.npmjs.com/package/utf8" target="_self"&gt;UTF8 NPM Package&lt;/A&gt; to force encoding of the string coming from the readFile.&lt;/P&gt;</description>
    <pubDate>Mon, 06 May 2019 10:45:48 GMT</pubDate>
    <dc:creator>Guich</dc:creator>
    <dc:date>2019-05-06T10:45:48Z</dc:date>
    <item>
      <title>Issue with Template API</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Issue-with-Template-API/m-p/267529#M24057</link>
      <description>&lt;P&gt;Hello, I'm getting an error message by the template API.&lt;BR /&gt;I'm using &lt;A href="https://developers.hubspot.com/docs/methods/templates/put_templates_template_id" target="_self"&gt;this one&lt;/A&gt;.&lt;BR /&gt;&lt;BR /&gt;The PUT URL is: &lt;A href="https://api.hubapi.com/content/api/v2/templates/7645641221" target="_blank" rel="noopener"&gt;https://api.hubapi.com/content/api/v2/templates/7645641221&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is an example of the error I'm getting.&lt;/P&gt;&lt;PRE&gt;{
  correlationId: "db3a660d-5d18-417f-97bd-f032ea2bb676"
  message: "Invalid UTF-8 start byte 0xf9↵ at [Source: java.io.SequenceInputStream@18302afa; line: 1, column: 22146]"
  requestId: "85492b7cd2affd886e25c3a783babbc8"
  status: "error"
}&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;The code I'm trying to push is a JS built with Webpack.&lt;BR /&gt;It's the first time since some month that I'm gettin this.&lt;BR /&gt;A sample of the code I'm trying to upload is in this &lt;A href="https://pastebin.com/2sC25YGy" target="_self"&gt;pastebin&lt;/A&gt;.&lt;BR /&gt;&lt;BR /&gt;Any help would be so appreciated.&lt;BR /&gt;&lt;BR /&gt;Thank u&lt;BR /&gt;&lt;BR /&gt;Update:&lt;BR /&gt;&lt;BR /&gt;If I copy/paste the code of the pastebin into the DM and then save, it works fine...&lt;BR /&gt;So, I think, there is something wrong with the API&lt;/P&gt;</description>
      <pubDate>Tue, 30 Apr 2019 12:09:10 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Issue-with-Template-API/m-p/267529#M24057</guid>
      <dc:creator>Guich</dc:creator>
      <dc:date>2019-04-30T12:09:10Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with Template API</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Issue-with-Template-API/m-p/267862#M24102</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/93249"&gt;@Guich&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does this happen for you every time you try to make this request? I was able to pass this JavaScript through the Templates API just now. I escaped the string before passing the request, and then used just Postman to make my request.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could you provide some more details about how you're making the request? I wonder if there's something about your setup that's causing that error. It sounds like our API is encountering a character that isn't valid UTF-8.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;- Leland&lt;/P&gt;</description>
      <pubDate>Wed, 01 May 2019 15:17:34 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Issue-with-Template-API/m-p/267862#M24102</guid>
      <dc:creator>lscanlan</dc:creator>
      <dc:date>2019-05-01T15:17:34Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with Template API</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Issue-with-Template-API/m-p/268048#M24123</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/5408"&gt;@lscanlan&lt;/a&gt;,&lt;BR /&gt;&lt;BR /&gt;thanks for the reply.&lt;BR /&gt;&lt;BR /&gt;This is the code for the upload of the file:&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Schermata 2019-05-02 alle 09.21.00.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/16918i20F7F828D13F1907/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Schermata 2019-05-02 alle 09.21.00.png" alt="Schermata 2019-05-02 alle 09.21.00.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using node.js with request-promise.&lt;BR /&gt;&lt;BR /&gt;I push online also some css files with the same code and no issue at all.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Anyway, I've tried to escape the code and push with Postman, but I'm getting and error too also here.&lt;BR /&gt;The error is:&amp;nbsp;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Schermata 2019-05-02 alle 09.23.12.png" style="width: 999px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/16919iE99CD02BAED4B671/image-size/large?v=v2&amp;amp;px=999" role="button" title="Schermata 2019-05-02 alle 09.23.12.png" alt="Schermata 2019-05-02 alle 09.23.12.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;For better readability:&lt;/P&gt;&lt;PRE&gt;{
    "status": "error",
    "message": "Unexpected character ('!' (code 33)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')\n at [Source: java.io.SequenceInputStream@685cc824; line: 1, column: 2]",
    "correlationId": "475591be-0449-416b-a2f3-b85ce16b19ab",
    "requestId": "77dc2b829c8615b438db84ce78c13ff6"
}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the support.&lt;BR /&gt;&lt;BR /&gt;Guido&lt;/P&gt;</description>
      <pubDate>Thu, 02 May 2019 07:29:49 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Issue-with-Template-API/m-p/268048#M24123</guid>
      <dc:creator>Guich</dc:creator>
      <dc:date>2019-05-02T07:29:49Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with Template API</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Issue-with-Template-API/m-p/268589#M24204</link>
      <description>&lt;P&gt;Ok, I found a solution.&lt;BR /&gt;&lt;BR /&gt;Used the &lt;A href="https://www.npmjs.com/package/utf8" target="_self"&gt;UTF8 NPM Package&lt;/A&gt; to force encoding of the string coming from the readFile.&lt;/P&gt;</description>
      <pubDate>Mon, 06 May 2019 10:45:48 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Issue-with-Template-API/m-p/268589#M24204</guid>
      <dc:creator>Guich</dc:creator>
      <dc:date>2019-05-06T10:45:48Z</dc:date>
    </item>
  </channel>
</rss>

