Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OAuthPermissionsException: This client has not been approved to access this resource. #111

Open
Jazcash opened this issue Mar 10, 2017 · 1 comment

Comments

@Jazcash
Copy link

Jazcash commented Mar 10, 2017

Simple node.js script:

var ig = require('instagram-node').instagram();
 
ig.use({ access_token: 'blahblahblah' });

ig.location('214991417', function(err, result, remaining, limit) {
    console.log(err);
});

Returns:

{ Error: OAuthPermissionsException: This client has not been approved to access this resource.
    at handle_error (C:\Users\user\Desktop\node_modules\instagram-node\lib\instagram.js:242:19)
    at C:\Users\user\Desktop\node_modules\instagram-node\lib\instagram.js:1246:16
    at IncomingMessage.<anonymous> (C:\Users\user\Desktop\node_modules\instagram-node\lib\instagram.js:197:18)
    at emitNone (events.js:91:20)
    at IncomingMessage.emit (events.js:188:7)
    at endReadableNT (_stream_readable.js:974:12)
    at _combinedTickCallback (internal/process/next_tick.js:80:11)
    at process._tickCallback (internal/process/next_tick.js:104:9)
  code: 400,
  error_type: 'OAuthPermissionsException',
  error_message: 'This client has not been approved to access this resource.',
  retry: [Function: retry] }

Any idea what the problem is?

@s0kil
Copy link

s0kil commented May 8, 2017

You have to set the correct scope when authorizing a user.
https://www.instagram.com/developer/authorization/

https://www.instagram.com/oauth/authorize/?client_id=CLIENTID&redirect_uri=REDIRECT-URI&response_type=token&scope=basic+public_content+follower_list+relationships+likes+comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants