title: Rails instagram error: {"code": 403, "error_type": "OAuthForbiddenException", "error_message": "You are not a sandbox user of this client"}
body: <p>I am having a scenario where users can upload pictures through Instagram. </p>
  
  <p>This is my controller callback method:</p>
  
  <pre><code>def instagram_callback
      response = Instagram.get_access_token(params[:code], :redirect_uri =&gt; Rails.application.config.custom.domain_url + 'instagram/callback/?edit=' + (params[:edit].present? ? params[:edit] : ''))
      oauth = OauthAccessToken.find_or_create_by(provider:'instagram', user_id:current_user.id)
      oauth.access_token = response.access_token
      oauth.save
      if params[:edit].present?
        redirect_to edit_user_report_path(current_user, params[:edit], :ig =&gt; true)
      else
        redirect_to new_user_report_path(current_user, :ig =&gt; true)
      end
    end
  </code></pre>
  
  <p>In my instagram.rb, I am having all the credentials(using sandbox).</p>
  
  <p>When I run the code, it asking instagram login, when I login with my insta account(sandbox credentials are given from this account), it is working fine but when I try to login with another account, it is throwing account as:</p>
  
  <blockquote>
    <p>{"code": 403, "error_type": "OAuthForbiddenException",
    "error_message": "You are not a sandbox user of this client"}</p>
  </blockquote>
  
  <p>This is my url:</p>
  
  <pre><code>https://www.instagram.com/oauth/authorize/?client_id=CLIENT_ID&amp;redirect_uri=http://localhost:3000/instagram/callback/?edit=&amp;response_type=code
  </code></pre>
  
  <p>Please help.</p>