I wrote a python script (automatically likes mediaIDs given a user-defined list of hashtags) that accesses the instagram API endpoint POST /media/media-id/likes using the python-instagram library. The program has been running for almost a year, many friends (and others) have used it since.
So I tried to set up another person today by registering a new instagram client. Then I RAN INTO THIS on the developer landing page. It states that Instagram is requiring users to request access to POST endpoints.
Here is a snippet of where the code fails:
for mID in mediaIDs:
#rate limit is 30 requests/hour
time.sleep(121)
api_sub2 = igLogin_API()
try:
api.like_media(media_id=mID.id)
like_count +=1
userIDs.append(mID.user)
liked_mediaIDs.append(mID)
img_urls.append(mID.images['standard_resolution'].url)
except:
e = sys.exc_info()[0]
print "already liked %s or %s" % (str(mID),str(e))
The exception is raised:
C:\Users\Andrew\Desktop\pygram>python IG_like.py
already likedMedia: 1006563954514666042_1643375967 or (<class'instagram.bind.InstagramAPIError'>, InstagramAPIError(), <traceback object at 0x0000000002C54648>)
Has instagram finally beaten bots? Can anyone offer a work-around?
Likes, relationships and comments now require approval.
To request access to this endpoint, fill up the form
I am still on the process of finding a way to work around it.