Retrieving information from Instagram using an unauthenticated request?
Question: I'm attempting to use the Instagram with Python and I'm running into an issue
just using the stock examples on their [GitHub
page.](https://github.com/facebookarchive/python-instagram) I'm following the
steps exactly in the first unauthenticated request section, and I'm being
thrown the following errors.

My code:

    
    
    from instagram.client import InstagramAPI
    
    access_token = "..."
    client_secret = "..."
    client_id = "..."
    api = InstagramAPI(client_id=client_id, client_secret=client_secret)
    popular_media = api.media_popular(count=20)
    for media in popular_media:
        print media.images['standard_resolution'].url
    

The error:

    
    
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "/Library/Python/2.7/site-packages/instagram/bind.py", line 197, in _call
        return method.execute()
      File "/Library/Python/2.7/site-packages/instagram/bind.py", line 189, in execute
        content, next = self._do_api_request(url, method, body, headers)
      File "/Library/Python/2.7/site-packages/instagram/bind.py", line 131, in _do_api_request
        raise InstagramClientError('Unable to parse response, not valid JSON.', status_code=response['status'])
    instagram.bind.InstagramClientError: (404) Unable to parse response, not valid JSON.
    

Any help would be appreciated! Again, this code is just straight from the docs
so I'm not sure why it's not working.


Answer: According to the Instagram Developers page,

"**Instagram Platform and documentation update**. Apps created on or after Nov
17, 2015 will start in Sandbox Mode and function on newly updated API rate-
limits and behaviors."

As a result, if you created your app before Nov 17, 2015, you will not be able
to perform unauthenticated requests.

Those docs from the python-instagram page(Last updated over 9 months ago) are
outdated if your app was created before Nov 17, 2015.

