title: Attribute provided with invalid value in Google Apps Script
body: <h2>Problem</h2>
  
  <ul>
  <li>I want to communicate with api while changing IP address, because the server restricts IP address. So, I add <strong>X-Forwarded-For</strong> header with UrlFetchApp. However, I get an error "<strong>Attribute provided with invalid value: Header:X-Forwarded-For</strong>
  "</li>
  </ul>
  
  <h2>Question</h2>
  
  <ul>
  <li>How can I solve this problem? Or is there another way?</li>
  </ul>
  
  <pre><code>function myFetch() {
  
    var url = "https://XXXXXXXXX"
  
    var options = { method: "GET" };
    options.headers = {
      Authorization: "Bearer " + MY_TOKEN,
      "X-Forwarded-For": "XXX.XXX.XXX.XXX"
    };
  
    var resp = UrlFetchApp.fetch(url, options);
    var json = resp.getContentText();
    var data = JSON.parse(json);
  
    return data;
  }
  </code></pre>
  
  <h2>Tried → Error</h2>
  
  <ul>
  <li>Tried : cURL request.
  →Success : I can change IP address, and get data.</li>
  </ul>
  
  <pre><code>    curl -X GET \
        https://XXXXXXXXX \
        -H 'Authorization: Bearer MY_TOKEN' \
        -H 'X-Forwarded-For: XXX.XXX.XXX.XXX' \
  </code></pre>
  
  <ul>
  <li><p>Tried : Delete X-Forwarded-For header.
  →Error : "<strong>API key does not allow access from IP XXX.XXX.XXX.XXX</strong>"</p></li>
  <li><p>Tried : I also add Host header. 
  →Error : "<strong>Attribute provided with invalid value: Header:Host</strong>".</p></li>
  </ul>
  
  <p>Does anybody have a solution for my problem?
  Best regards,</p>