Sandbox Users not found via API - sandbox

Yesterday I could find a user via the API:
https://api.instagram.com/v1/users/search/?q=...&access_token=...
But now everything returns Meta-code-200 and empty data.
What happened?

If your app is in sandbox mode then you can get information about only sandbox invited users.
If you app is in live mode then make sure public_content permission is Approved.
Please also check scope you are using. Make sure in scope you are sending public_content permission.

Related

How to get instagram access token for app in sandbox mode

Currently when using instagram access token by the url "https://www.instagram.com/oauth/authorize/?client_id=[id]&redirect_uri=http://localhost:3000&response_type=token&scope=public_content" I have such an error
"This request requires scope=public_content, but this access token is not authorized with this scope. The user must re-authorize your application with scope=public_content to be granted this permissions."
I observed the internet and found that scope query part should be added to the end of API URL. That is how I constructed my url. But as you see it resulted in error.
I tried to find out the reason on app permissions page. There is a button "Start submission". I clicked it and got the list of radio buttons. But when I clicked on " I want to display my Instagram posts on my website." then I got:
You do not need to submit for review for this use case. If you are a developer and you want to display Instagram content on your website, then you do not need to submit your app for review. By using a client in sandbox mode, you can still access the last 20 media of any sandbox user that grants you permission.
So I finally got lost. Looks like the solution is pretty simple because in instafeed.js plugin no more information is provided. But I can not resolve it by myself.
change your scope to basic should work.
The link has 'public_content'
https://www.instagram.com/oauth/authorize/?client_id=&redirect_uri=http://localhost:5000&response_type=token&scope=basic

surveymonkey webhooks creation API giving permission error

I am trying to create a webhook for my survey using the API -
https://developer.surveymonkey.com/api/v3/#webhooks.
However, I am getting an out of scope - permission denied to the request.
P.S. : My account with SurveyMonkey is under GOLD PLAN.
Please help.
You need to make sure you are requesting the webhooks scopes in your app settings.
Go to https://developer.surveymonkey.com/apps/ find the app you are working with and click "Settings".
You should see a scopes section like this:
Make sure view/create webhooks are set to required. Then you can use the auto-generated access token, or when doing oauth approve the app and you'll have access to those scopes.

Instagram public_content permission

My app worked for a year and then the API calls to instagram stopped returning any data.
I use the following instagram endpoint:
https://api.instagram.com/v1/media/search?lat=48.858844&lng=2.294351&access_token=MY_TOKEN
I noticed I need the public_content permission but.. what Instagram requires in order to give me this permission? I couldn't understand anything from the documentation and they dissapproved my request for this permission.
The Instagram API Platform can be used to build non-automated, authentic, high-quality apps and services that:
Help individuals share their own content with 3rd party apps.
Help brands and advertisers understand, manage their audience and
media rights.
Help broadcasters and publishers discover content, get digital rights to media, and share media with proper attribution.
Best way to get public content permission is register an client application follow in one of those tree categories above, fill use case carefully with an screencast of you application and cross your fingers ;).
Leonel's answer is not correct. You get the public_content scope for your app by re-requesting an auth token with that additional permission. This has nothing to do with Sandbox mode or Live mode. This can be done for Live and Sandbox apps, but inclusiveness of the results will be determined by which mode you are in. Even when you have public_content scope for a Sandbox Mode app, you can only see the public content from sandbox users you invite to your client.
So Leonel is partially correct in the sense that the permissions problem may not even matter to you if you cannot get your client approved.
Read this short explanation of Instagram scopes and modes.

Error from Instagram: The access_token provided does not match an approved application

This was working fine for many months and now it's just a blank space. I get the following error: Error from Instagram: The access_token provided does not match an approved application. How can I get a new access_token for an existing client??
You need to check you application hasn't been put into sandbox by Instagram. They made big changes to their API on the 1st of June and if you had it submitted your app for review it will be put in sandbox mode and only sandbox users will be able to use it.
Even if you are not in sandbox mode you may need to get your users to reaurhorize your app due to new scopes being used to control access to everything other than basic user information.
Check Instagram Developer Docs for more information on the changes
You need to check your Access token's Scope and asking for login permission
where some new Scope had been added ex:public_content Added. Also don't forget to check for requirements Scope for API you are using and if it's need and Authentications "Valid access Token". where also had some changes.
basic - to read a user’s profile info and media
public_content to read any public profile info and media on a user’s behalf
follower_list to read the list of followers and followed-by users
comments - to post and delete comments on a user’s behalf
relationships - to follow and unfollow accounts on a user’s behalf
likes - to like and unlike media on a user’s behalf
And take look about **Sandbox API behavior of your application not life yet :**
API Behavior
The behavior of the API when you are in sandbox mode is the same as when your app is live, but comes with the following restrictions:
Data is restricted to sandbox users and the 20 most recent media from each sandbox user
Reduced API rate limits
The first point is important and it means that the API behaves as if the only users on Instagram were your sandbox users, and the only media ever posted were the last 20 for each of these users.
For example, if you query the /users/{user-id}/ endpoint and the {user-id} is a sandbox user, then you will get the normal API response; but if the {user-id} is not a sandbox user, you will get a APINotFound error.
As another example, let's consider an endpoint that returns a list of media: /tags/{tag-name}/media/recent. The response returned by this endpoint will contain only media with the given tag, as expected. But instead of returning media from any public Instagram user, it will return only media that belongs to your sandbox users, restricted to the last 20 for each user.
Good luck
The following video clearly explains what steps to follow to get this working with the new auth
https://www.youtube.com/watch?v=0k4RhTS94Hw
Kind Regards
Sandeep Sahoo

Instagram api sandbox allowed or not

Which endpoints are allowed in just sandbox before approval process? I read about the "extended" permissions you can request after approval..but seem's like follower list and users/search?q= is not working.
So how am I supposed to show them a screencast/video of my app working required for the approval? I have 2 sandbox users I'm testing with..
You can use all endpoints in sandbox mode, the only difference is is that only sandbox users you have defined and their posts exist. Everyone else and their media is invisible to your client.
For example: MyUserA is a Sandbox user (defined in your client settings) MyUserB is not. Search for "MyUser" will show MyUserA but not MyUserB
For search you must also have added scope=public_content to your authorisation request. This will work in sandbox, but not production unless you have applied for and been accepted for the scope

Resources