title: Escape curly braces in Google Script
body: <p>Apologies for any lack of technical specificity in this post, I’m stumbling around in the dark at the moment. </p>
  
  <p>I’m currently trying to write a Google script to call the Insightly API (<a href="https://api.insight.ly" rel="nofollow noreferrer">https://api.insight.ly</a>) and I’ve run into a problem.</p>
  
  <p>As far as I can see Insightly requires curly braces to be used when referring to a record’s ID in an API call, however Google script returns an error when URL’s containing curly braces are used. </p>
  
  <p>How can I escape those curly braces so Google script treats them the same as any other bit of text?</p>
  
  <p>Here’s my code</p>
  
  <pre><code>var url = "https://api.insight.ly/v2/Opportunities/{217}"
  var response = UrlFetchApp.fetch(url, headers);
  </code></pre>
  
  <p>Thanks :)</p>