Twitch subscribe time

Hello. While working with the IPA I encountered a problem. When I display the list of subscribers, I can not get the correct date and time of the subscription.

   [1] => Array
                (
                    [created_at] => 2018-01-19T15:53:47Z
                    [_id] => 27bd64aef5007e4b7ae16136b291f6dfb3450298
                    [sub_plan] => 1000
                    [sub_plan_name] => Забил Койко-место
                    [is_gift] => 
                    [user] => Array
                        (
                            [display_name] => 0x4f
                            [type] => user
                            [bio] => 
                            [created_at] => 2013-12-21T20:48:32Z
                            [updated_at] => 2018-03-16T18:37:03Z
                            [name] => 0x4f
                            [_id] => 53619875
                            [logo] => https://static-cdn.jtvnw.net/jtv_user_pictures/318d7d68-7707-4acb-b882-1a6f131ccce5-profile_image-300x300.png
                        )

                    [sender] => 
                )

            [2] => Array
                (
                    [created_at] => 2018-01-19T15:49:16Z
                    [_id] => af002ac2ce0313054794ccddb36971bf2a8b9e1d
                    [sub_plan] => 1000
                    [sub_plan_name] => Забил Койко-место
                    [is_gift] => 
                    [user] => Array
                        (
                            [display_name] => XanderWP
                            [type] => user
                            [bio] => 
                            [created_at] => 2017-05-03T17:50:01Z
                            [updated_at] => 2018-03-16T17:33:31Z
                            [name] => xanderwp
                            [_id] => 155646323
                            [logo] => https://static-cdn.jtvnw.net/jtv_user_pictures/a2341f5d-a38b-45d9-bd8f-df3438fa8be6-profile_image-300x300.png
                        )

                    [sender] => 
                )

There is no proper subscription time within the data set. I hope you can help me in this matter.

The field you’re looking for is the created_at in the first level of each subscriber in the array. This is the date and time when the user subscribed to the channel. The date-time is just formatted to the RFC 3339 specification, and will need to be converted to a usable format.

Just so people are aware though, the created_at field is the timestamp of when that subscription object was created, it may not accurately show when a user originally subscribed to the channel. For example, I have a channel where the created_at value is about 18 months ago, yet I’ve been subscribed to that channel for over 26 months. The reason for the inconsistency in my case was a change of payment method, but other things like changing sub tier can also affect the results.

Hopefully Helix will have a better channel subscriptions endpoint.

2 Likes

This makes me wonder how the free month that Twitch is handing out to people for the cancelled subs will affect created_at.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.