[Golang] Get All Story Highlights of Specific Instagram User


In my previous post three months ago, we can get all story highlights from the following single API endpoint:

https://i.instagram.com/api/v1/highlights/{{USERID}}/highlights_tray/

But Instagram changes API again, and the above endpoint returns only partial links now. So I mades some searches [1] today and found [2] [3] that we can get the rest of links from another API endpoint:

https://i.instagram.com/api/v1/feed/reels_media/

The first endpoint returns an array of highlight trays, and each of the highlight tray consists of stories of a specific title. For users who has many highlight trays, only first few trays have links of stories. The rest of the trays are empty.

The get the content of empty highlight trays, we need to supply the id of the highlight trays to the second API endpoint one by one, and the endpoint will return the content of the highlight tray.

The above description is the whole picture of how to get all links of story highlights. For implementation details, please see my commit [4] and instago repo.


Tested on: Ubuntu Linux 17.10, Go 1.10.2.


References:

[1]
[2]Instagram-API/Highlight.php at master · mgp25/Instagram-API · GitHub
[3]Instagram-API/Story.php at master · mgp25/Instagram-API · GitHub
[4]get all story highlights of user · siongui/instago@f2a9f33 · GitHub