title: X-Access-Token Request Failure with Python
body: <p>I have a request URI and a token. If I use:</p>
  
  <pre><code>curl -X GET \
   -H 'X-Access-Token: __API_EXPLORER_AUTH_KEY__' \
   'https://eatstreet.com/publicapi/v1/restaurant/search?method=both&amp;street-address=316+W.+Washington+Ave.+Madison,+WI'
  </code></pre>
  
  <p>etc., I get a 200 and view the corresponding JSON data. However, when I try to access this data via a python script I keep getting 400 and 401 error codes.</p>
  
  <p>I think there is something wrong with how I am formatting the HTTP Request Header for authentication. Here are some of the details listed on the site: </p>
  
  <p>EatStreet API is a suite of stateless JSON endpoints, requested over HTTPS. The production API is simply hosted on <a href="https://eatstreet.com" rel="nofollow noreferrer">https://eatstreet.com</a> under the /publicapi/v1 path. </p>
  
  <p>Authentication
  Every request to EatStreet API must be authenticated with an access token. New developers should go here to receive an access token.</p>
  
  <p>Authentication Option: HTTP Request Header
  Include the following request header: X-Access-Token: {access token}.</p>
  
  <p>Authentication Option: Query Parameter
  Include the following URL query parameter: access-token={access token}.</p>
  
  <p>Here is a link to the EatStreat API documentation: <a href="https://developers.eatstreet.com/" rel="nofollow noreferrer">https://developers.eatstreet.com/</a></p>
  
  <p>I think there is an issue with my syntax, but I've tried so many different variations to format the code and I keep coming up with either a 400 or 401 status code.</p>
  
  <p>This is the script I have currently.</p>
  
  <pre><code>api_url = 'https://eatstreet.com/publicapi/v1/restaurant/search'
  apiKey = '__API_EXPLORER_AUTH_KEY__'
  
  headers = {'X-Access-Token': apiKey}
  
  def get_restaurant_info():
  
      response = requests.get(api_url, headers = headers)
  
      print(response.status_code)
  </code></pre>
  
  <p>I am expecting a JSON file with the format: { "address": Address, "restaurants": Restaurant[] }</p>
  
  <p>Instead, I am getting a bad request HTTP status code.</p>