Search code examples
instagram-api

How might we request for a new Instagram Access Token?


As I understand it, Instagram may expire our access tokens after an arbitrary period of time, in which case 'API responses will contain an “error_type=OAuthAccessTokenError”'.

Is the only way around this to get users to log in again?

I'm building an Instagram service which helps brands manage their following, and every day at a set time we request for their pictures and comments to run data analysis on engagement rates. Does that mean that we might arbitrarily lose access at any time and not be able to restart our service to our clients till they log in to authenticate again manually?

Any help with renewing Access Tokens would be appreciated!


Solution

  • You should verify if the initial grant included a refresh token in the authentication response. If not you may need to reauthenticate after expiration I think.