gongpex Posted September 24, 2019 Share Posted September 24, 2019 (edited) Hello everyone, long time no see I hope y'all fine, Today I tried to use i.instagram api according on this source : https://instagram.api-docs.io/1.0/accounts There is no enough documentation on that link, so when I tried to connect to got some data it refused and asked login as credential. Q : Is there somebody ever used this API ? please answer Thanks Edited September 24, 2019 by gongpex Link to comment Share on other sites More sharing options...
Ingolme Posted September 24, 2019 Share Posted September 24, 2019 It looks pretty straightforward. It indicates the request method, headers and body as well as what responses you can expect. What more do you need? Link to comment Share on other sites More sharing options...
gongpex Posted September 25, 2019 Author Share Posted September 25, 2019 8 hours ago, Ingolme said: It looks pretty straightforward. It indicates the request method, headers and body as well as what responses you can expect. What more do you need? Hello thanks for reply, please use this code : var settings = { "async": true, "crossDomain": true, "url": "https://i.instagram.com/api/v1/fbsearch/places", "method": "GET", "headers": {}, "data": "{'q':'london'}" } $.ajax(settings).done(function (response) { console.log(response); }); not entire code can be accessed, it need login, if this code executed it would result ajax response code 302 and then redirect to 301 finally 200 with link : https://www.instagram.com/accounts/login/?next=/api/v1/fbsearch/places/%3Fq%3Dlondon%26%257B%257D N : thing what I need is how to access this instagram api account, from where I can register so that I can use this API. please help me Thanks Link to comment Share on other sites More sharing options...
justsomeguy Posted September 25, 2019 Share Posted September 25, 2019 The login page has a "sign up" link. Link to comment Share on other sites More sharing options...
gongpex Posted September 26, 2019 Author Share Posted September 26, 2019 (edited) 10 hours ago, justsomeguy said: The login page has a "sign up" link. Hello, thanks for reply, I've open according on that link but it redirect to www.instagram.com and my account. Note : When I tried this code I was logged in on my instagram account but it still said : login required, please see my network console : Request URL: https://i.instagram.com/api/v1/accounts/current_user?csrfKey=31611c89600aee8c6758f088c51bb00f Request Method: GET Status Code: 301 Remote Address: 157.240.13.52:443 Referrer Policy: no-referrer-when-downgrade /* redirect to */ Request URL: https://i.instagram.com/api/v1/accounts/current_user/?csrfKey=31611c89600aee8c6758f088c51bb00f Request Method: GET Status Code: 403 Remote Address: 157.240.13.52:443 Referrer Policy: no-referrer-when-downgrade /* response / results */ {message: "login_required", error_title: "You've Been Logged Out", error_body: "Please log back in.",…} error_body: "Please log back in." error_title: "You've Been Logged Out" logout_reason: 2 message: "login_required" status: "fail" this url (https://i.instagram.com/api/v1/fbsearch/places/?{'q':'london'}) could be opened on url address browser if you had logged in on instagram account and the result was json, but cannot access in ajax. A : If y'all have some information or know about this API please let me know, because I really need it. Thanks Edited September 26, 2019 by gongpex wrong text Link to comment Share on other sites More sharing options...
justsomeguy Posted September 26, 2019 Share Posted September 26, 2019 Well I bet you can access it just fine with ajax if you log in with that browser first. It's still the browser that sends the request, it's not like when you send an ajax request the browser does something completely different than when you click a link or type a URL. They are all the same kinds of requests to the web server. Link to comment Share on other sites More sharing options...
gongpex Posted September 27, 2019 Author Share Posted September 27, 2019 Hello, thanks for reply, 8 hours ago, justsomeguy said: Well I bet you can access it just fine with ajax if you log in with that browser first. I've log in already when I used that ajax code, but still on the network XHR result like on above, it need me to log in although I've logged in already, A : If you not objection please try it, if you have instagram account log in first and then use that code to access it to get some data. That's all I can ask from you.. I would really appreciate it, because I really need this API. Many Thanks Link to comment Share on other sites More sharing options...
justsomeguy Posted September 27, 2019 Share Posted September 27, 2019 I don't have an instagram account, but if you're having problems using it then hopefully you can contact them or look for a forum that they provide. It looks to me like you need to login on the page that they redirect you to, if you're saying that doesn't work then I don't know why. Link to comment Share on other sites More sharing options...
gongpex Posted October 3, 2019 Author Share Posted October 3, 2019 Hello, Thanks for reply, Q : Can I use cookie or session that provided by instagram through ajax or other lang such PHP maybe? Thanks again. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now