Error type oauthexception code 400 error message invalid scope field s basic

Issue I have integrate Instagram login using Xamarin.Auth, I have referred: Instagram basi...

Issue

I have integrate Instagram login using Xamarin.Auth, I have referred:
Instagram basic display api — Getting Started
and in that first I was getting:

{"error_type": "OAuthException", "code": 400, "error_message": "Invalid scope field(s): basic"}

Then I have got this post: C# Instagram — Invalid Scope

So I have updated everything and I have created New App in developers.facebook.com console under Instagram Basic Display product as mentioned in Instagram Getting Started document.

Then in code I have used that new App’s App ID and also changed redirect url, also added Instagram Test users and they have accept invitations too, but now I am getting

{"error_type": "OAuthException", "code": 400, "error_message": "Invalid redirect_uri"}

Auth code:

var authenticator = new OAuth2Authenticator(
    clientId: Keys.InstagramClientId,  
    scope: "basic",  
    authorizeUrl: new Uri("https://api.instagram.com/oauth/authorize/?client_id=" + Keys.InstagramClientId + "&redirect_uri=https://localhost:3000/callback&response_type=token"),
    redirectUrl: new Uri("https://localhost:3000/callback"))
{
    AllowCancel = true,
    ShowErrors = false,
    ClearCookiesBeforeLogin = true
};

AuthenticationState.Authenticator = authenticator;

authenticator.Error += (sender, eventArgs) =>
{
    activity.Finish();
};

authenticator.Completed += (sender, eventArgs) =>
{
    if (eventArgs.IsAuthenticated)
    {
        App.AccountType = "Instagram";
        App.SaveAccount(eventArgs.Account, view.IsFromReauthentication);
    }
};

var presenter = new Xamarin.Auth.Presenters.OAuthLoginPresenter();
presenter.Login(authenticator);


Output:

enter image description here

Solution

Finally I have make it work, sharing this as it might be help for someone looking for the solution!


var authenticator = new OAuth2Authenticator(

// Id & App Secret of App you have created on FB developer console in Instagram Basic Display
clientId: Keys.InstagramAppId,
clientSecret: Keys.InstagramAppSecret,

// Basic scope is not supported anymore, this will fix Invalid scope error:
scope: "user_profile, user_media",

authorizeUrl: new Uri("https://api.instagram.com/oauth/authorize/?client_id=" + Keys.InstagramAppId + "&redirect_uri=https://business.instagram.com/abc&response_type=token"),

accessTokenUrl: new Uri("https://api.instagram.com/oauth/access_token/"),

// Make sure that your redirect Url needs to register in developer console and it must be valid one
redirectUrl: new Uri("https://business.instagram.com/abc"))
{
    AllowCancel = true,
    ShowErrors = false,
    ClearCookiesBeforeLogin = true,
    IsLoadableRedirectUri = false
};

AuthenticationState.Authenticator = authenticator;

authenticator.Error += (sender, eventArgs) =>
{
    Debug.WriteLine($"Error - {eventArgs.Message}");
};

authenticator.Completed += (sender, eventArgs) =>
{
    if (eventArgs.IsAuthenticated)
    {
        var userid = eventArgs.Account.Properties["user_id"];
        var access_token = eventArgs.Account.Properties["access_token"];
    }
};

var presenter = new Xamarin.Auth.Presenters.OAuthLoginPresenter();
presenter.Login(authenticator);


To get user information:

Request details using :

https://graph.instagram.com/me?fields=id,username&access_token

Sample Response :

{
  "id": "17841405793187218",
  "username": "jayposiris"
}

Note: I have not got the way to get user’s profile_picture, so if anyone know that solution please let me know.

Answered By — Divyesh_08

Home Help

{«error_type»: «OAuthException», «code»: 400, «error_message»: «Invalid scope field(s): basic»}

Comments


  • error instagram feed in brazil
    {«error_type»: «OAuthException», «code»: 400, «error_message»: «Invalid scope field(s): basic»}
  • Mobirise just does not have time to make changes into the instagram block after the instagram developers change the API.
  • UPDATE
    The remaining Instagram Legacy API permission («Basic Permission») was disabled on June 29, 2020. As of June 29, third-party apps no longer have access to the Legacy API. To avoid disruption of service to your app and business, developers previously using the Legacy API should instead rely on Instagram Basic Display API and Instagram Graph API . Please request approval for required permissions through the App Review process.

    Legacy API user identifier available on Basic Display API until September 30, 2020
    To assist with migration, we have temporarily made the unique user identifier from the Legacy API — ig_id — available on Basic Display API. However, the ig_id field will be deprecated on Basic Display API on September 30, 2020, so please ensure you are using other fields (e.g. the Facebook «id» field) or your own unique identifier for your users. See our developer documentation here to learn more.

    User Token Generator
    If you’re only using the Legacy API to generate tokens in order to display your Instagram Feed on a personal website, you can use the Instagram Basic Display API’s User Token Generator to continue generating tokens. The User Token Generator does not require App Review, but it will only work for your owned Instagram accounts (i.e. accounts for which you know the login credentials). Refer to the developer documentation here to learn more. If you’re using the Legacy API to display multiple accounts on your website, then you must apply for permissions to Instagram Basic Display API via App Review. If you’re using the Legacy API for any other use case, you must apply for permissions on the Instagram Graph API platform via App Review.

    More Tips
    For more guidance on getting through our App Review process, please see this blog post . For more tips and tools, check out our App Review Rejection Results Guide , Common App Review Rejection Reasons and Developer Tools page . We also encourage you to leverage the Facebook Developer Community Forum — it’s a tremendously helpful resource for communicating and connecting with developers across the world.

  • Thank you for reporting this. Our developers are working on this issue.
  • Thank you for reporting this. Our developers are working on this issue.

    Thanks support, I actually reported it on an email this morning, so I am glad I have found this thread :)
    Hopefully the new API will be sorted soon then, let us know if you have a timeline

  • Are there no predictions for this new api to come into effect on mobrise?
  • Hi, I’m new at this and I’m having some trouble accessing Aliexpress. Having only logged in through Instagram, I have no other way to access my store’s entire order database (dropshipping). Is there any way I can get in, due to Instagram is no longer available and if I log in by other methods, I’m redirected to other pages outside of my store?
    Greetings.
  • Are there any predictions for this new API to take effect in mobrise?
  • Thank you for reporting this. Our developers are working on this issue.

    Hi, I’m new at this and I’m having some trouble accessing Aliexpress. Having only logged in through Instagram, I have no other way to access my store’s entire order database (dropshipping). Is there any way I can get in, due to Instagram is no longer available and if I log in by other methods, I’m redirected to other pages outside of my store?
    Greetings.

  • Instagram is the problem NOT Mobirise
  • Instagram is the problem NOT Mobirise

    Well, not correct. Instagram just updated the API, which happens.
    They communicated and even delayed the phasing out of the legacy API, until the 29th of June. So developers had plenty of time to update their software to the new API.
    Mobirise should have worked on their Instagram feed module during that time, but I believe they didn’t notice the imminent change, until of course the legacy API phased out and caused all the modules to fail (and all the reports from the users).
    I am not a fan of Instagram, to be clear, but many other services have the same approach and it is down to the developers to keep up to date.

    Here is one of the articles you can find on the internet about this. The change was supposed to happen in March, delayed by a few months until the 29th of June. As I said, there has been plenty of time.
    https://embedsocial.com/blog/instagram-api-changes-2020/

  • Instagram feed on my website has also begin not displaying properly. Please hurry Mobirise!
  • I also put my complaint about this failure. I have 16 sites in production made with Mobirise and now everyone fails the Instagram Feed.

    One is aware that they improve the constructor on a daily basis, but you should not forget sensible things like social networks.

  • Is there any forecast for the solution of the problem?
  • Hope to get the fix… Same here….
  • Thank you for reporting this. Our developers are working on this issue.

    Hi, I’m new at this and I’m having some trouble accessing Aliexpress. Having only logged in through Instagram, I have no other way to access my store’s entire order database (dropshipping). Is there any way I can get in, due to Instagram is no longer available and if I log in by other methods, I’m redirected to other pages outside of my store?
    Greetings.

    Thank you! There’s a solution for it or are we still waiting for it?

  • Кто-нибудь решил эту проблему
  • Кто-нибудь решил эту проблему

    I did not

  • Looks like the solution is today published. Just update extension and go to the Social Instagram block. Click the gear and search for your Instagram page. Should load right away. Just tested my website and published :)

  • Has anyone solved this problem with logging into aliexpress using instagram?
  • Has anyone solved this problem with logging into aliexpress using instagram?

    AliExpress handles the same AliExpress. You have to wait for that problem to be fixed.

  • If you can’t log in to aliexpress using instagram, and you have important orders there, write in support and start a live chat. Your deliveries will be transferred to a new account
  • {«error_type»: «OAuthException», «code»: 400, «error_message»: «Invalid scope: []»}

    Still Problem impossible connect ……….

  • {«error_type»: «OAuthException», «code»: 400, «error_message»: «Invalid scope: []»}

    Still Problem impossible connect ……….

    Update the instagram extension.

  • {«error_type»: «OAuthException», «code»: 400, «error_message»: «Invalid scope: []»}

    Still Problem impossible connect ……….

    Update the instagram extension.

    After update extensions, uninstalling mobirise fully and re-install, even delete all modules and re-install still following error:

    Please help.

  • {«error_type»: «OAuthException», «code»: 400, «error_message»: «Invalid scope: []»}

    Still Problem impossible connect ……….

    Update the instagram extension.

    After update extensions, uninstalling mobirise fully and re-install, even delete all modules and re-install still following error:

    Please help.

    Did you re-add your instagram block?

This discussion has been closed because the issue is solved.

  • Hi,
    Since today the Instagram Login with your pre-configured app isn’t working anymore. This error message occurs:
    {“error_type”: “OAuthException”, “code”: 400, “error_message”: “Invalid scope field(s): basic”}

    Please support – it’s urgent!

    Best regards

    The page I need help with: [log in to see the link]

Viewing 7 replies — 1 through 7 (of 7 total)

  • Hi,

    Do you have a solution for this Error?
    Would bei really urgent 🙈

    Best regards,
    Domi

    Hi Domi,

    Thanks for reaching out to us.

    Instagram has recently modified its API’s and for updated APIs, we are in touch with the Instagram Team. We will refresh it as soon as possible.

    Thanks

    Do you have a timeline when the Instagram login will work again?
    Best regards,
    Domi

    same problem! {“error_type”: “OAuthException”, “code”: 400, “error_message”: “Invalid scope field(s): basic”}
    When you will fix it? Right now it is. 13/07/2020 at 03:51 am.

    Hi,

    Instagram Basic Display is not an authentication solution. Data returned by the API cannot be used to authenticate your app users or log them into your app. If you need an authentication solution we recommend using Facebook Login instead.

    Using Instagram API we can only access the user information which is not related to authentication.

    Thank you.

    • This reply was modified 2 years, 5 months ago by miniOrange.

    Hi,
    Thank for the reply.
    Will you offer something that I could access the Instagram information to a logged in user?

    Best regards,
    Domi

    Hi guys,

    I was just wondering if you found a fix to this issue. I am also facing issues with social login to my website via instagram. The error I receive is:

    {“error_type”: “OAuthException”, “code”: 400, “error_message”: “Invalid scope: []”}

    Please let me know if anyone has a fix.

    Thanks,

    Karan

Viewing 7 replies — 1 through 7 (of 7 total)

  • The topic ‘Social Login with Instagram – Error Code 400’ is closed to new replies.

Понравилась статья? Поделить с друзьями:
  • Error type int argument given to delete expected pointer
  • Error type in swift
  • Error type identifier expected
  • Error type excel на русском
  • Error type card removed