2
votes

When I Post this Code: https://api.instagram.com/v1/users/{userid}/relationship?access_token={access_token} Or Other Instagram Api

Recive This massage:

code = 400; "error_message" = "This request requires scope=relationships, but this access token is not authorized with this scope.

The user must re-authorize your application with scope=relationships to be granted write permissions."; "error_type" = OAuthPermissionsException;

How To Using Scope And What is This? I can't See any Example On Instagram.Developer

1

1 Answers

0
votes

You Should set Your Scope On authentication

like This Code:

   protected void BtnLogin_Clicked(object sender, EventArgs e)
        {
            var client_id = ConfigurationManager.AppSettings["instagram.clientid"].ToString();
            var redirect_uri = ConfigurationManager.AppSettings["instagram.redirecturi"].ToString();
            Response.Redirect("https://api.instagram.com/oauth/authorize/?client_id="
+ client_id + "&redirect_uri=" + redirect_uri + "&response_type=code&scope=basic+likes+comments+relationships+follower_list+public_content ");

    }