title: Big commerce authorization ajax call
body: <p>I am working with Big Commerce API. We just use Big Commerce Hosted Shop and no extra hosing.
  So we cannot use BC API in PHP code.</p>
  
  <p>I try to call ajax to get some additional data such as custom fields to display separately.</p>
  
  <p>My solution is to create an user with Permission "Manage Product". Then I use this credentials to create Ajax call.</p>
  
  <p>Here is ajax:</p>
  
  <pre><code>$.ajax({
  type: 'GET',
  url: 'https://store-convvXX.mybigcommerce.com/api/v2/products/85/customfields.json',
  dataType: 'json',
  //'otherSettings': 'othervalues',
  beforeSend: function(xhr) {
      //May need to use "Authorization" instead
      xhr.setRequestHeader("Authorization",
          "Basic amF2YXNjcmlwdF91c2VyOjI0MmEwMTU1NWYyYjk4OTk1MzI3MmM1MDQxYjU1MTlj");
  },
  success: function(result) {
      alert('done');
      document.write(result);
  },
  error: function(){
      alert('error');
  }
  </code></pre>
  
  <p>});</p>
  
  <p>However, I always get response 401. Anyone can share with me your experience.
  I will appreciate any of your inputs so much.</p>