Instagram how to get my user id from username?

前端 未结 24 1112
傲寒
傲寒 2020-11-30 17:14

I\'m in the process of embedding my image feed in my website using JSON, the URL needs my user id so I can retrieve this feed.

So, where can I find/get my user id?

24条回答
  •  没有蜡笔的小新
    2020-11-30 17:47

    I think the best, simplest and securest method is to open your instagram profile in a browser, view source code and look for user variable (ctrl+f "user":{") inside main javascript code. The id number inside user variable should be your id.

    This is the code how it looked in the moment of writing this answer (it can, and probably will be changed in future):

    "user":{"username":"...","profile_picture":"...","id":"..........","full_name":"..."}},
    

提交回复
热议问题