Jump to content
Sign in to follow this  
gongpex

i.instagram api

Recommended Posts

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 by gongpex

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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 by gongpex
wrong text

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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 

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...