TheM4hd1 / SwiftyInsta

Instagram Private API Swift

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't successfully get story viewers

biox86 opened this issue · comments

I can't successfully get my story viewers.

The first thing I do is getting my stories with "handler.stories.by".
This returns the trayElement where I successfully get the story id String from trayElement.identity.identifier.

But when I try to fetch the story viewers using the previous story id String with "handler.stories.viewers" I get a 400 response with this message: "Cannot access media viewer info".

I am probably missing something, can someone give me a hint about that?
Thanks in advance.

Sorry for the late reply.
Instagram might have changed something… I'll check later and update you.

I'm sorry I've never got back at you, I genuinely thought I did. Apologies @biox86. 🙇‍♂️

Instagram indeed changed the way you request story viewers.
As I'm sure you are aware by now, I'm only dealing with critical issues in SwiftyInsta, and this is not one.

I'm closing this issue.
Swiftagram has recently added the functionality you were looking for and it's working as intended, in case you might want to consider it or someone, willing to implement it in the future in SwiftyInsta, requires some inspiration for a PR (in that case they can simply open this issue again). 😉

@sbertix @biox86
The new endpoint is /api/v1/media/{media_id}/list_reel_media_viewer/
HTTP Method: GET

response:

{"users": [{"pk": 194815837, "username": "mehdi.makhdumi", "full_name": "Mahdi Makhdumi", "is_private": true, "profile_pic_url": "https://scontent-frx5-1.cdninstagram.com/v/t51.2885-19/s150x150/92923020_2670585903160200_5682852983763632128_n.jpg?_nc_ht=scontent-frx5-1.cdninstagram.com\u0026_nc_ohc=Gjjb-_8k6LwAX8tST1e\u0026oh=e912db46c96b2cb6fc443623d577db49\u0026oe=5F58FF9E", "profile_pic_id": "2286527982638508562_194815837", "friendship_status": {"following": false, "followed_by": false, "is_private": true, "incoming_request": false, "outgoing_request": false, "is_bestie": false, "is_restricted": false}, "is_verified": false, "latest_reel_media": 0, "latest_besties_reel_media": 0}], "next_max_id": null, "user_count": 1, "total_viewer_count": 1, "updated_media": {"taken_at": 1596888882, "pk": 2371198310068856583, "id": "2371198310068856583_20882188221", "device_timestamp": 1596888882815055, "media_type": 1, "code": "CDoMEzDqScH", "client_cache_key": "MjM3MTE5ODMxMDA2ODg1NjU4Mw==.2", "filter_type": 0, "image_versions2": {"candidates": [{"width": 750, "height": 1334, "url": "https://scontent-frt3-2.cdninstagram.com/v/t51.2885-15/e35/117118944_155498706126435_7592643696001401222_n.jpg?_nc_ht=scontent-frt3-2.cdninstagram.com\u0026_nc_cat=103\u0026_nc_ohc=1wZpPw9hF3sAX8xuYSN\u0026se=7\u0026oh=5b22182cf216b4bb0ab80b9b343a430e\u0026oe=5F30C63B\u0026ig_cache_key=MjM3MTE5ODMxMDA2ODg1NjU4Mw%3D%3D.2", "scans_profile": "e35"}, {"width": 249, "height": 442, "url": "https://scontent-frt3-2.cdninstagram.com/v/t51.2885-15/e35/p249x249/117118944_155498706126435_7592643696001401222_n.jpg?_nc_ht=scontent-frt3-2.cdninstagram.com\u0026_nc_cat=103\u0026_nc_ohc=1wZpPw9hF3sAX8xuYSN\u0026se=7\u0026oh=e5c559e107f98eb3b7edb41c0b2c6f84\u0026oe=5F31375D\u0026ig_cache_key=MjM3MTE5ODMxMDA2ODg1NjU4Mw%3D%3D.2", "scans_profile": "e35"}]}, "original_width": 750, "original_height": 1334, "user": {"pk": 20882188221, "username": "ios.devel", "full_name": "Allecia", "is_private": false, "profile_pic_url": "https://scontent-frx5-1.cdninstagram.com/v/t51.2885-19/s150x150/92191141_578258749492571_7104103884448071680_n.jpg?_nc_ht=scontent-frx5-1.cdninstagram.com\u0026_nc_ohc=R_mszF8jPH4AX8l0I5D\u0026oh=a43b1203e0d30151d1ab4c849fd1dfec\u0026oe=5F569AE7", "profile_pic_id": "2280560319172583413_20882188221", "is_verified": false, "has_anonymous_profile_picture": false, "can_boost_post": false, "can_see_organic_insights": false, "show_insights_terms": false, "reel_auto_archive": "on", "is_unpublished": false, "allowed_commenter_type": "any", "account_badges": []}, "caption_is_edited": false, "caption_position": 0.0, "is_reel_media": true, "timezone_offset": 16200, "photo_of_you": false, "can_see_insights_as_brand": false, "caption": null, "fb_user_tags": {"in": []}, "can_viewer_save": true, "organic_tracking_token": "eyJ2ZXJzaW9uIjo1LCJwYXlsb2FkIjp7ImlzX2FuYWx5dGljc190cmFja2VkIjpmYWxzZSwidXVpZCI6Ijc0MjhiNTlmNDYzNDQ3MzliZjkyZTViZmI4ZTlhNzkyMjM3MTE5ODMxMDA2ODg1NjU4MyIsInNlcnZlcl90b2tlbiI6IjE1OTY4ODkwODY4Mjd8MjM3MTE5ODMxMDA2ODg1NjU4M3wyMDg4MjE4ODIyMXxlYThhMDkwMjI0YmM5Yzc4MTE2OGFjNjI0N2I3OTg5NWUwOGI0ZDIwODYzOWQ0ZjBhZTQxMjMyODQ4YTA0YjJjIn0sInNpZ25hdHVyZSI6IiJ9", "expiring_at": 1596975282, "sharing_friction_info": {"should_have_sharing_friction": false, "bloks_app_url": null}, "is_in_profile_grid": false, "profile_grid_control_enabled": false, "deleted_reason": 0, "can_reshare": true, "can_reply": false, "creative_config": {"camera_facing": "front", "capture_type": "rich-text", "attribution_user_id": "25025320", "attribution_user": {"instagram_user_id": "25025320", "username": "instagram", "profile_picture": {"uri": "https://external-frt3-2.xx.fbcdn.net/safe_image.php?d=AQAT5wNRPdWLkH0t\u0026w=100\u0026h=100\u0026url=https%3A%2F%2Fscontent-frx5-1.xx.fbcdn.net%2Fv%2Ft51.2885-15%2F101703932_264332984810770_2870985139712688128_n.jpg%3F_nc_ohc%3D6cWWuj7bWukAX-Yikj5%26_nc_ad%3Dz-m%26_nc_cid%3D0%26_nc_ht%3Dscontent-frx5-1.xx%26oh%3Db0ae0e904dc316a80681fb4604fcd4ce%26oe%3D5F54514C\u0026cfs=1\u0026_nc_hash=AQDsKoqlEQq78Op3"}, "id": "17841400039600391"}, "should_render_try_it_on": false}, "story_is_saved_to_archive": true, "create_mode_attribution": {"type": "TYPE", "name": "Type"}, "viewers": [{"pk": 194815837, "username": "mehdi.makhdumi", "full_name": "Mahdi Makhdumi", "is_private": true, "profile_pic_url": "https://scontent-frx5-1.cdninstagram.com/v/t51.2885-19/s150x150/92923020_2670585903160200_5682852983763632128_n.jpg?_nc_ht=scontent-frx5-1.cdninstagram.com\u0026_nc_ohc=Gjjb-_8k6LwAX8tST1e\u0026oh=e912db46c96b2cb6fc443623d577db49\u0026oe=5F58FF9E", "profile_pic_id": "2286527982638508562_194815837", "is_verified": false}], "viewer_count": 1, "viewer_cursor": null, "total_viewer_count": 1, "multi_author_reel_names": [], "supports_reel_reactions": true, "can_send_custom_emojis": true, "show_one_tap_fb_share_tooltip": true, "has_shared_to_fb": 0, "has_shared_to_fb_dating": 0, "source_type": -1}, "reactions": [], "status": "ok"}

---UPDATE---
I noticed SwiftyInsta still using this endpoint, Just tested it and worked fine. I'm closing this issue.