Instagram 从用户名获取用户 ID

Instagram get user ID from username

我最近从我的雇主那里发现,不再需要 public 访问令牌来从用户名获取用户 ID,这很好,但我找不到相关文档。我在 Instagram api 上找不到此信息或如何实现。

我找到了使用 client_ID 的解决方案。

https://api.instagram.com/v1/users/search?q=[USERNAME]&client_id=[CLIENT ID]

我找到了使用 client_ID 的解决方案。

https://api.instagram.com/v1/users/search?q=[USERNAME]&client_id=[CLIENT ID]

有了代码就可以使用https://www.instagram.com/{username}/?__a=1 例如https://www.instagram.com/instagram/?__a=1

没有代码,您可以使用该网站: https://www.thekeygram.com/find-instagram-user-id/