Instagram API: force prompt during authentication

api, instagram, oauth

Solution

I believe that the most simple way is to use next url:

https://instagram.com/accounts/logoutin/?force_classic_login=&next=URLENCODED_INSTAGRAM_OAUTH_URI_PATH_WITH_YOUR_DATA

For example:

window.location.assign('https://instagram.com/accounts/logoutin/?force_classic_login=&next=' + encodeURIComponent('/oauth/authorize/?response_type=code&scope=public_content+follower_list+comments&client_id='+ YOUR_IG_CLIENT_ID + '&redirect_uri='+encodeURIComponent(YOUR_REDIRECT_URI)));

Please take a note that your redirect uri should be encoded twice

Problem

Is there a way for the instagram auth(login) to always ask for authentication? This is skipped when the user is logged in and has already authorized the app. It would be something like twitter's `use_authorize=true` or google's `approval_prompt=force`.

Original source

Related problems