Instafeed.js: Get data by 'user'. Error requiring accessToken. Instafeed docs say otherwise.

Created on 3 Mar 2017  路  8Comments  路  Source: stevenschobert/instafeed.js

In the instafeed changelog (1.4.0), this is present:
"accessToken is no longer required to fetch images from user accounts!"

However, when attempting to display images using the code below (userId replaced with x's), I'm getting an error back:

Uncaught Error: Missing clientId or accessToken.

var feed = new Instafeed({
            get: 'user',
            userId: 1234567890,
            template: '<a href="{{link}}"><img src="{{image}}" /></a><p>{{caption}}</p>',
            limit: 2
      });
     feed.run();

When I include the developer clientId for this client, I get this error message:
Uncaught Error: No access token. Use the 'accessToken' option.

I tried to submit a request to remove the account from sandbox mode, but instagram says that is not necessary for this usage.

Any help would be greatly appreciated!

stale

Most helpful comment

It looks like an access token is now required. I've found an easy way to generate one using this link in the browser:

https://api.instagram.com/oauth/authorize/?client_id=[your client id]&redirect_uri=[your redirect uri]&response_type=token

All 8 comments

I have the same problem. Would be nice if you can take a look at it.

There鈥檚 a metric ton of issues/posts to read through regarding this problem. Simplest thing you can do is go read Everything You Need to Know About Instagram API Integration, which offers some simple means.

It looks like an access token is now required. I've found an easy way to generate one using this link in the browser:

https://api.instagram.com/oauth/authorize/?client_id=[your client id]&redirect_uri=[your redirect uri]&response_type=token

Hey everyone! @jsuarez-navisite is right, the access token _is_ required now.

I released v1.4 shortly before Instagram announced a big round of API changes, where they made the token required again. The docs are incorrect because I haven't updated them for the latest API changes yet (sorry!)

If you need to generate an access token, you can just the method @jsuarez-navisite described, or check #408 from some alternate options (some 3rd parties will generate tokens for you).

@stevenschobert
i generated access token and used it but when i searched from user id. It said "Error from Instagram: this user does not exist"
but when i replace my access token with another that i found in the internet from another widget, it worked, still that user id
dont know what hapeend
same user id, different access token and result in user not exits

@acbpro sounds like a sandboxing issue. If the user you are trying to fetch is not added to your sandbox account, your token won't be able to access them. Tokens generated in live mode don't have this restriction.

Everyone still wrestling with Instagram should read this lovely guide: https://css-tricks.com/everything-need-know-instagram-api-integration/

This issue has been automatically marked as stale because it hasn't had new comments in the last 3 months. It will be closed if no further activity occurs. If you still need assistance with this issue, or believe it shouldn't be closed, please respond with a new comment to let us know.
Thank you all for your contributions.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

belham picture belham  路  3Comments

juanchigallego picture juanchigallego  路  3Comments

benjamin-hull picture benjamin-hull  路  6Comments

stevenschobert picture stevenschobert  路  8Comments

lansas picture lansas  路  5Comments