# PubSub Subscription Gifts

**URL:** <https://staging-discuss.dev.twitch.com/t/pubsub-subscription-gifts/12886>\
**Category:** API\
**Created:** [November 16, 2017, 9:19am UTC](https://staging-discuss.dev.twitch.com/t/pubsub-subscription-gifts/12886 "2017-11-16T09:19:58Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![CodeWizardTV](https://d1d6mrmdu7ztse.cloudfront.net/user_avatar/staging-discuss.dev.twitch.com/codewizardtv/32/3539_2.png) [@CodeWizardTV](https://staging-discuss.dev.twitch.com/u/CodeWizardTV)\
**Post date:** [November 16, 2017, 9:19am UTC](https://staging-discuss.dev.twitch.com/t/pubsub-subscription-gifts/12886/1 "2017-11-16T09:19:58Z")

</div>

Hi there,

will there be an update to the API PubSub Topic to see to whom a subscription has been gifted to?  
As far as i have seen you can still see only who gifted the subscription (by id and name) but not to whom.

Thanks, Ron

---

<div class="post-metadata">

**Author:** ![BarryCarlyon](https://d1d6mrmdu7ztse.cloudfront.net/user_avatar/staging-discuss.dev.twitch.com/barrycarlyon/32/253_2.png) [@BarryCarlyon](https://staging-discuss.dev.twitch.com/u/BarryCarlyon)\
**Post date:** [November 16, 2017, 4:36pm UTC](https://staging-discuss.dev.twitch.com/t/pubsub-subscription-gifts/12886/2 "2017-11-16T16:36:17Z")

</div>

> {“user\_name”:“someguy”,“display\_name”:“SomeGuy”,“channel\_name”:“somechan”,“user\_id”:“someid”,“channel\_id”:“someid”,“recipient\_id”:“someid”,“recipient\_user\_name”:“someotherguy”,“recipient\_display\_name”:“SomeOtherGuy”,“time”:“2017-11-15T20:13:43.535081023Z”,“sub\_message”:{“message”:“”,“emotes”:null},“sub\_plan”:“1000”,“sub\_plan\_name”:“Channel Subscription (SomeChannel)”,“months”:1,“context”:“subgift”}

Hopefully this helps?

user\_name/display\_name is whom gave the sub  
recipient\_user\_name/recipient\_display\_name is whom recieved the sub

---

<div class="post-metadata">

**Author:** ![CodeWizardTV](https://d1d6mrmdu7ztse.cloudfront.net/user_avatar/staging-discuss.dev.twitch.com/codewizardtv/32/3539_2.png) [@CodeWizardTV](https://staging-discuss.dev.twitch.com/u/CodeWizardTV)\
**Post date:** [November 16, 2017, 6:59pm UTC](https://staging-discuss.dev.twitch.com/t/pubsub-subscription-gifts/12886/3 "2017-11-16T18:59:17Z")

</div>

So this is already updated ? nice  
Thanks man for the data!

---

<div class="post-metadata">

**Author:** ![GrowfyBruce](https://d1d6mrmdu7ztse.cloudfront.net/user_avatar/staging-discuss.dev.twitch.com/growfybruce/32/3664_2.png) [@GrowfyBruce](https://staging-discuss.dev.twitch.com/u/GrowfyBruce)\
**Post date:** [November 21, 2017, 7:10pm UTC](https://staging-discuss.dev.twitch.com/t/pubsub-subscription-gifts/12886/4 "2017-11-21T19:10:15Z")

</div>

Are there going to be similar new fields in the USERNOTICE on Chat?

---

<div class="post-metadata">

**Author:** ![3ventic](https://d1d6mrmdu7ztse.cloudfront.net/user_avatar/staging-discuss.dev.twitch.com/3ventic/32/298_2.png) [@3ventic](https://staging-discuss.dev.twitch.com/u/3ventic)\
**Post date:** [November 21, 2017, 7:11pm UTC](https://staging-discuss.dev.twitch.com/t/pubsub-subscription-gifts/12886/5 "2017-11-21T19:11:02Z")

</div>

```auto
badges=moderator/1,subscriber/12,cuphead_1/1;color=#0044CC;display-name=saltjuice;emotes=;id=3863d53d-371b-4cab-8054-b4b0f0484f90;login=saltjuice;mod=1;msg-id=subgift;msg-param-months=1;msg-param-recipient-display-name=xxworlddragonxx;msg-param-recipient-id=124825259;msg-param-recipient-user-name=xxworlddragonxx;msg-param-sub-plan-name=Low\sTier\sMemes\sSquad;msg-param-sub-plan=1000;room-id=12928129;subscriber=1;system-msg=saltjuice\sgifted\sa\s$4.99\ssub\sto\sxxworlddragonxx!;tmi-sent-ts=1510777884798;turbo=0;user-id=116186741;user-type=mod USERNOTICE #slyfoxhound

```

---

<div class="post-metadata">

**Author:** ![GrowfyBruce](https://d1d6mrmdu7ztse.cloudfront.net/user_avatar/staging-discuss.dev.twitch.com/growfybruce/32/3664_2.png) [@GrowfyBruce](https://staging-discuss.dev.twitch.com/u/GrowfyBruce)\
**Post date:** [November 21, 2017, 7:11pm UTC](https://staging-discuss.dev.twitch.com/t/pubsub-subscription-gifts/12886/6 "2017-11-21T19:11:19Z")

</div>

Excellent. Ta!

---

<div class="post-metadata">

**Author:** ![mrny2cali](https://avatars.discourse-cdn.com/v4/letter/m/f9ae1b/32.png) [@mrny2cali](https://staging-discuss.dev.twitch.com/u/mrny2cali)\
**Post date:** [November 27, 2017, 8:28am UTC](https://staging-discuss.dev.twitch.com/t/pubsub-subscription-gifts/12886/7 "2017-11-27T08:28:51Z")

</div>

Could you tell the Twitch website team to update the API docs to reflect any new versions, calls, responses. The above is ecactly what is needed with more people gifting subs & the Twitch tools places like Muxy, StreamLabs, StreamElements, OBS are still working off old doc info so they only show Purchaser - Tier - sub/resub.

It would be great if within the Twitch Dashboard there was a Detailed Activity report.  
Timestamp (Local)  
Timecode (by !uptime)  
VOD\_ID  
Type = Follow, Sub, Resub, Gift Sub, Bits,  
Username (Purchaser or Follower)  
Recipient (Giftee)  
Sub Type (Sub, Resub, GiftSub)  
Sub Tier (Prime,1,2,3)  
Sub Tier Price (1,2,3)  
Resub Months (0-infinite)  
Bit\_amount  
Message = If any

---

<div class="post-metadata">

**Author:** ![BarryCarlyon](https://d1d6mrmdu7ztse.cloudfront.net/user_avatar/staging-discuss.dev.twitch.com/barrycarlyon/32/253_2.png) [@BarryCarlyon](https://staging-discuss.dev.twitch.com/u/BarryCarlyon)\
**Post date:** [November 27, 2017, 9:24am UTC](https://staging-discuss.dev.twitch.com/t/pubsub-subscription-gifts/12886/8 "2017-11-27T09:24:03Z")

</div>

> [@mrny2cali](#):
>
> OBS

OBS doesn’t have anything to do with showing sub information.

> [@mrny2cali](#):
>
> Muxy, StreamLabs, StreamElements

Fairly sure these guys tend to get the documentation early under _[is murdered before revealing information]_

If they are showing incorrect information, please let them know. My stuff was fixed about 5 minutes after I got a sub gift payload (when referring to sub gifting specifically)

> [@mrny2cali](#):
>
> Could you tell the Twitch website team to update the API docs to reflect any new versions

Enough devs pass a comment like this every time. Twitch are trying to be better. And we devs share what we can when we can on le forums

---

<div class="post-metadata">

**Author:** ![mrny2cali](https://avatars.discourse-cdn.com/v4/letter/m/f9ae1b/32.png) [@mrny2cali](https://staging-discuss.dev.twitch.com/u/mrny2cali)\
**Post date:** [November 27, 2017, 5:03pm UTC](https://staging-discuss.dev.twitch.com/t/pubsub-subscription-gifts/12886/9 "2017-11-27T17:03:30Z")

</div>

Barry, I’m curious what you use to generate your Sub Gifting stuff, a personal script, 3rd party provider etc. I know a few Twitch partner streamers that would like a real-time way to show this info & potentially hook it into OBS for an Overlay. It seams the major players only do Sub/Resub and don’t get the Gifting portion info. How did you know the added recipient stuff was even in the API, as its not public on the API doc info page from what I can find?  
And to be honest I’m not a developer but through my time in web hosting and content delivery network management I’ve QA’d and run my fair share of python, perl and php scripts. So, any help you could give me would be of great assistance. I understand it all, just can’t write it myself ! 🙂

---

<div class="post-metadata">

**Author:** ![BarryCarlyon](https://d1d6mrmdu7ztse.cloudfront.net/user_avatar/staging-discuss.dev.twitch.com/barrycarlyon/32/253_2.png) [@BarryCarlyon](https://staging-discuss.dev.twitch.com/u/BarryCarlyon)\
**Post date:** [November 27, 2017, 7:18pm UTC](https://staging-discuss.dev.twitch.com/t/pubsub-subscription-gifts/12886/10 "2017-11-27T19:18:35Z")

</div>

> [@mrny2cali](#):
>
> How did you know the added recipient stuff was even in the API

I log everything that comes over pubsub, on all relevant topics and some unofficial ones, and fixed my parser when I got a different packet to what was usual.

In this case it happened to be during Dropped Frames and Twitch Tweeted about the feature, and pretty much instantly people started using the feature in the $channel I primarily work for. So since my PubSub Consumer logs everything, took me all of five minutes to apply a patch everywhere, patch my software client and pushed out an update to my software client within 15 minutes.

Both PubSub and Twitch TMI notice give the relevant information, you just have to read the data.

---

<div class="post-metadata">

**Author:** ![mrny2cali](https://avatars.discourse-cdn.com/v4/letter/m/f9ae1b/32.png) [@mrny2cali](https://staging-discuss.dev.twitch.com/u/mrny2cali)\
**Post date:** [November 27, 2017, 7:37pm UTC](https://staging-discuss.dev.twitch.com/t/pubsub-subscription-gifts/12886/11 "2017-11-27T19:37:41Z")

</div>

So what software do you use? I think I’m missing something in your last reply. I want to literally do the same thing, log everything going on with the channel I mod for, and my own channel in the future.

---

<div class="post-metadata">

**Author:** ![BarryCarlyon](https://d1d6mrmdu7ztse.cloudfront.net/user_avatar/staging-discuss.dev.twitch.com/barrycarlyon/32/253_2.png) [@BarryCarlyon](https://staging-discuss.dev.twitch.com/u/BarryCarlyon)\
**Post date:** [November 27, 2017, 8:13pm UTC](https://staging-discuss.dev.twitch.com/t/pubsub-subscription-gifts/12886/12 "2017-11-27T20:13:32Z")

</div>

Everything is custom.

I mean I use some off the shelf libraries, why bother making a web socket library when someone already did…

---

<div class="post-metadata">

**Author:** ![mrny2cali](https://avatars.discourse-cdn.com/v4/letter/m/f9ae1b/32.png) [@mrny2cali](https://staging-discuss.dev.twitch.com/u/mrny2cali)\
**Post date:** [November 27, 2017, 8:24pm UTC](https://staging-discuss.dev.twitch.com/t/pubsub-subscription-gifts/12886/13 "2017-11-27T20:24:58Z")

</div>

So since I’m not a dev, what would be the easiest way for me to get a sub/sub gift report going that either goes to a discord channel or whatever to keep an activity log as Muxy and StreamLabs don’t show the proper info & aren’t that reliable when going back in time to lookup activity.

---

<div class="post-metadata">

**Author:** ![BarryCarlyon](https://d1d6mrmdu7ztse.cloudfront.net/user_avatar/staging-discuss.dev.twitch.com/barrycarlyon/32/253_2.png) [@BarryCarlyon](https://staging-discuss.dev.twitch.com/u/BarryCarlyon)\
**Post date:** [November 27, 2017, 9:12pm UTC](https://staging-discuss.dev.twitch.com/t/pubsub-subscription-gifts/12886/14 "2017-11-27T21:12:14Z")

</div>

Non Real time: [https://dev.twitch.tv/docs/v5/reference/channels#get-channel-subscribers](https://dev.twitch.tv/docs/v5/reference/channels#get-channel-subscribers)

Real Time: PubSub or a ChatBot reading the relevant topic/usernotice

---

<div class="post-metadata">

**Author:** ![mrny2cali](https://avatars.discourse-cdn.com/v4/letter/m/f9ae1b/32.png) [@mrny2cali](https://staging-discuss.dev.twitch.com/u/mrny2cali)\
**Post date:** [November 27, 2017, 9:53pm UTC](https://staging-discuss.dev.twitch.com/t/pubsub-subscription-gifts/12886/15 "2017-11-27T21:53:32Z")

</div>

so can you give me an example what I can use to get a list of all channel subs & gift subs for a time period like X month. I’m on a mac so I can run stuff. Again note, not a dev. I just need a report I can pull to list things out as right now only twitch chat prints that info in real-time, but doesn’t have an activity log to pull a report if I miss chat.

---

<div class="post-metadata">

**Author:** ![Six](https://d1d6mrmdu7ztse.cloudfront.net/user_avatar/staging-discuss.dev.twitch.com/six/32/2334_2.png) [@Six](https://staging-discuss.dev.twitch.com/u/Six)\
**Post date:** [November 28, 2017, 1:32am UTC](https://staging-discuss.dev.twitch.com/t/pubsub-subscription-gifts/12886/16 "2017-11-28T01:32:28Z")

</div>

> [@BarryCarlyon](#):
>
> I mean I use some off the shelf libraries, why bother making a web socket library when someone already did…

Because some of us are masochistic and like implementing everything ourselves 😛 (And maybe also because we’re bored lol)

---

<div class="post-metadata">

**Author:** ![BarryCarlyon](https://d1d6mrmdu7ztse.cloudfront.net/user_avatar/staging-discuss.dev.twitch.com/barrycarlyon/32/253_2.png) [@BarryCarlyon](https://staging-discuss.dev.twitch.com/u/BarryCarlyon)\
**Post date:** [November 28, 2017, 9:38am UTC](https://staging-discuss.dev.twitch.com/t/pubsub-subscription-gifts/12886/17 "2017-11-28T09:38:40Z")

</div>

> [@mrny2cali](#):
>
> I just need a report I can pull to list things

For subscribers I believe you can pull a CSV/Report/Download from your dashboard, assuming you are a partner.

I know this report exists, but I do not know what it contains having never seen one

---

<div class="post-metadata">

**Author:** ![system](https://d2spem0quai2ol.cloudfront.net/original/2X/0/05909729875cce3b53e59d5561c4d23bb14948fc.png) [@system](https://staging-discuss.dev.twitch.com/u/system)\
**Post date:** [December 28, 2017, 9:38am UTC](https://staging-discuss.dev.twitch.com/t/pubsub-subscription-gifts/12886/18 "2017-12-28T09:38:46Z")

</div>

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