D
D
Dmitry Lyapun2015-11-18 20:07:05
Python
Dmitry Lyapun, 2015-11-18 20:07:05

Why doesn't python instagram work, with authorization problems?

A similar question was asked, but I have a different problem. Registered the application, received client_id, client_secret, access_token.

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

We get an error:
InstagramClientError at /citys/
(404) Unable to parse response, not valid JSON.

We try another request and get an error
api.tag(tag_name='sun')
(400) OAuthPermissionsException-This request requires scope=public_content, 
but this access token is not authorized with this scope. The user must re-authorize 
your application with scope=public_content to be granted this permissions.

It turns out that the problem is in the token, and I need to get it again, but why, if it is always the same!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
developinwed, 2015-11-27
@developinwed

Perhaps because Instagram closed its API?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question