Get Instagram Stories Json
10,387
There is currently no official API for Instagram Stories.
In order to authenticate the request to that unofficial API endpoint, you must send a device 'sessionid', not your Instagram app's access token.
You can read my Medium article describing what you need to make a successful request to retrieve Instagram Stories: https://medium.com/@calialec/chrome-ig-story-bribing-the-instagram-story-api-with-cookies-c813e6dff911
Also, check out my GitHub repo to see where I'm injecting the cookies into the request: https://github.com/CaliAlec/ChromeIGStory/blob/master/event/src/index.js#L167
Related videos on Youtube
Author by
Tushar Pingale
Updated on May 28, 2022Comments
-
Tushar Pingale almost 2 years
How can I get Instagram Stories in JSON Object by using Instagram API? I have tried using the following URL, but I am getting this error.
// https://i.instagram.com/api/v1/feed/user/MY_USER_ID/reel_media/ { "message": "login_required", "logout_reason": 2, "status": "fail" }
Code :
String id = userInfoHashmap.get(InstagramApp.TAG_ID); JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.GET, "https://i.instagram.com/api/v1/feed/user/"+id +"/reel_media/?access_token="+mApp.getTOken(), new Response.Listener<JSONObject>() { @Override public void onResponse(JSONObject response) { Log.d("ID: ", String.valueOf(response)); } }, new Response.ErrorListener() { @Override public void onErrorResponse(VolleyError error) { } });
-
Orvenito over 6 yearsbro, you have to login.
-
Tushar Pingale over 6 yearswhere to add the authorization code in the Api Url. I got the authorization token.
-
Orvenito over 6 yearsshow some code.
-
Tushar Pingale over 6 years@Orvenito see my code
-
-
Tushar Pingale over 6 yearsHere is my api that i am using i.instagram.com/api/v1/feed/user/MY_USER_ID/reel_media/… but same error
-
redead over 6 yearsYou should change the URL to the documented form: api.instagram.com/v1/feed/user/MY_USER_ID/reel_media/…
-
redead over 6 yearsTry to paste the URL to a browser. You should get your desired result there. Otherwise your access token may have expired
-
Tushar Pingale over 6 yearsSame error. Can you make sure, it is the same URL required to fetch Instagram stories?
-
redead over 6 yearsHave a look at sandbox mode. instagram.com/developer/sandbox
-
Mykyta Bondarenko almost 6 yearsHi. I have the same issue now. It appeared just a day ago for me :( I use all 3 cookies:
sessionid
(I regenerate it for each session),csrftoken
andds_user_id
-
Vishal Patoliya ツ about 5 years@Alec I have not found github project, can you help me please.
-
Vishal Patoliya ツ about 5 years@redead this url is not working can you please help me for that
-
Alec Garcia about 5 years@VishalPatoliyaツ Due to a Cease & Desist letter from Facebook, I have been forced to take down the GitHub repo.