1

I'm trying to write a service, that can get the Instagram feed for a specific user.

Im using InstaSharp, but I can't figure out how to do the authentication without redirecting the end user to a https://api.instagram.com/oauth/authorize url

I can't find any examples, beside this (and others looking like it)

Can anyone give me any pointers. For now I have a Instagram app in sandbox mode, and a selection of users, who have accepted the sandbox invite.

Mikkel Nielsen
  • 792
  • 2
  • 13
  • 36

1 Answers1

2

I don't think it's possible with this library. You better generate your access token by yourself - https://elfsight.com/blog/2016/05/how-to-get-instagram-access-token/ and then request user's feed as like this

https://api.instagram.com/v1/users/{USER-ID}/media/recent/?access_token={YOUR-ACCESS-TOKEN}

If you want to deserialize your JSON object to c#, please use this service - http://json2csharp.com for generating your class and then using Newtownsoft library:

JsonConvert.DeserializeObject<RootObject>(yourClass)

Good luck.

Sergey Zykov
  • 687
  • 2
  • 9
  • 15
  • 2
    You are right. Getting a app approved to access the API is almost impossible. So we ended up going with access-tokens. You can use this URL insted: https://api.instagram.com/v1/users/self/media/recent/?access_token= There you only need the access-token, not a user ID – Mikkel Nielsen Jul 13 '17 at 19:50