7

I am thinking on a project that uses insta APIs but when I signup for instagramdeveloper account I have some kinda issue with it. I cannot find a button to create new Client and when I hit Manage client button this is what I got:

here

when I hit Registration Disabled button Nothing Happens. Is that mean am I ban from an Instagram developer account? please note I haven't created any kind of Client ID since I created an Instagram developer account.

OR was this some kinda bug? How can I report my issue to the Instagram support team? your suggestions are appreciated:)

Ns789
  • 531
  • 10
  • 21

3 Answers3

4

I dont know why my registration button is disabled too. Maybe Instagram api update. But I realize this guide and It works for me. https://developers.facebook.com/docs/instagram-basic-display-api/getting-started

Updated :

In my case, i am using webview in android. So, below is the example code : (Ignore the Dialog, you can implement only webview and its onpagefinished method)

    public class AuthenticationDialog extends Dialog {
        private String TAG = AuthenticationDialog.class.getSimpleName();
        private AuthenticationListener listener;
        private Context context;
        private WebView webView;

        private final String url = "https://api.instagram.com/" + "oauth/authorize/?app_id=" +
                getResources().getString(R.string.app_id)
                + "&redirect_uri="
                + getResources().getString(R.string.redirect_url)
                + "&response_type=code"
                + "&scope=user_profile,user_media";

        public AuthenticationDialog(@NonNull Context context, AuthenticationListener listener) {
            super(context, android.R.style.Theme_Black_NoTitleBar_Fullscreen);

            this.context = context;
            this.listener = listener;
        }

        @Override
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            this.setContentView(R.layout.auth_dialog);
            this.getWindow().setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
            initializeWebView();
        }

        private void initializeWebView() {
            webView = (WebView) findViewById(R.id.webView);
            webView.getSettings().setUseWideViewPort(true);
            webView.getSettings().setLoadWithOverviewMode(true);

            webView.getSettings().setJavaScriptEnabled(true);
            webView.loadUrl(url);
            Log.d(TAG, "url: " + url);
            webView.setWebViewClient(new WebViewClient() {

                String access_token;
                boolean authComplete;

                @Override
                public void onPageStarted(WebView view, String url, Bitmap favicon) {
                    super.onPageStarted(view, url, favicon);
                    Log.d(TAG, "onPageStarted called");
                }

                @Override
                public void onPageFinished(WebView view, String url) {
                    super.onPageFinished(view, url);
                    Log.d(TAG, "onPageFinished called " + url);
                    if (url.contains("?code=") && !authComplete) {
                        Log.d(TAG, " inside access_token");
                        access_token = url;
                        //get the whole token after "=" sign
                        access_token = access_token.replace("https://www.instagram.com/?code=","");
                        access_token = access_token.replace("#_","");
                        Log.d(TAG, "token: " + access_token);
                        authComplete = true;
                        listener.onTokenReceived(access_token);
                        webView.loadUrl("https://instagram.com/accounts/logout/");

                        dismiss();
                    } else if (url.contains("?error")) {
                        Log.d(TAG, "getting error fetching access token");
                        dismiss();
                    } else {
                        Log.d(TAG, "outside both" + url.toString());
                    }
                }
            });
        }
    }
Rembulan Moon
  • 338
  • 3
  • 11
  • I am getting the error on Step 4: Authenticate the Test User in that document. Can you explain how you did that? – Kowsigan Atsayam Oct 30 '19 at 19:44
  • You can open that link in any browser or webview if you are using android – Rembulan Moon Oct 31 '19 at 07:28
  • Now I fixed that one. But getting some error on Step 5: Exchange the Code for a Token. Like this -> { "error_type": "OAuthException", "code": 400, "error_message": "Matching code was not found or was already used" } Is there any other solution to get user id and access token in instagram? Kindly help me on this. – Kowsigan Atsayam Oct 31 '19 at 09:50
  • i am not sure about the problem, are you generate access token by postman? please check your code not include any "#_" character. – Rembulan Moon Nov 01 '19 at 02:04
  • I am also facing same problem {"error_type": "OAuthException", "code": 400, "error_message": "Matching code was not found or was already used"} – user2028 Dec 05 '19 at 11:15
  • POST https://api.instagram.com/oauth/access_token D/OkHttp: app_id="app id"&app_secret="App secret"&grant_type=authorization_code&redirect_uri=https%253A%252F%252Flocalhost%253A8081%252F&code=AQCDTDeDxUrpl_pqQRit2lL3i_OITTknGdIyUyQAOylu-SqSPz-t2pMlDNTAS8SFEeaJlyKWGC8BScFKXOZY5M9dgFMjd-GSfw5zGAgU6IsMJYOLNA74Dd8-dOTiM7X18Rmu6ZWTG-lHg7pcI8Tmzaa2e4XASvuhTfPdGKuyWLPD2c8F2zvJOnLNprDC4a3WEcI9Xi2FA6BAC8-KyYUoMAv9U3a1VhbyGB2gmEPr0SmTFw D/OkHttp: --> END POST – user2028 Dec 05 '19 at 11:15
  • Maybe you can replace redirect uri to "https://www.instagram.com/". i am not sure it will work. But its like you are using localhost, i dont know it works or not if redirect uri is localhost. – Rembulan Moon Dec 06 '19 at 07:02
3

It's really hard to find Instagram customer support direct interact whenever you are in trouble with some sort of APIs like I have Because the same problem faces my self. honestly https://help.instagram.com not help me a lot because it's quite confusing to find the support interact.

To report the issue you face to Instagram customer support team can be done:

Through Instagram Android Application

Explain your exact problem to report a problem to ICS. here

And this is how I fix my problem and my registration new client button is back:)

here

Community
  • 1
  • 1
Ns789
  • 531
  • 10
  • 21
2

After a week ago I posted my first answer, but then I got a message on my Instagram developer dashboard.

here

And My New registration button disabled again because in the favor of new Instagram Display API.

here

Ns789
  • 531
  • 10
  • 21