Reputation: 47945
I need to display intsagram photo by one user in my webpage. So, users that watch the page don't need any "login" mask, just look at the photos by the user (which is the owner of the current webpage).
So, in my further application I can call:
https://api.instagram.com/v1/users/" + userID + "/media/recent?client_id=" + id + "&access_token=2822asfa656.24523525.934634634csafa8asasaeea40
But Instagram API says Access tokens may expire at any time in the future..
So how can I manage this scenario? I won't to change access_token every time, in the future!
Upvotes: 0
Views: 4140
Reputation: 173
Had same issue. The best and most reliable solution imo:
Upvotes: 1
Reputation: 635
I think the general approach for Access_Tokens is that they are issued to each Authenticated user and shouldn't be shared amongst multiple users given their volatility to expire. Client_ID is your global access token but obviously has limitations of 5000 requests per hour, so in my implementations of the Instagram API i store the Access_Token against the user session on my site so every user has their own unique Access_Token once they authenticate, otherwise they will use the Client_ID.
Upvotes: 0