So, there was this really cool thing I saw in Strucid over a year ago. I want to replicate this.
It gives you a skin if you’re subscribed with your subscriptions public. Any way I can do something similar in my own game?
Ok so here’s some documentation for the webhooks that you can use to check if a user has subscribed to another channel. The subscriptions have to be visible for this to work.
Here’s an article explaining how to get the API working, you just have to replace the URL mentioned in this post to your URL with the subscriptions.
It would look something like this for your case:
https://www.googleapis.com/youtube/v3/subscriptions?part=snippet&channelId=[CHANNEL ID OF PLAYER]&forChannelId=[CHANNEL ID OF CHANNEL YOU WANT TO CHECK FOR]&key=[YOUR API KEY]
That API is actually broken after twitch screwed everything up and made it 10x more complicated.
Actually, it was working fine for me just yesterday. Initially, it was erroring frequently but now its very consistent.
Oh I thought you meant twitch’s api. Na, youtubes API is just fine.
What’s to stop people from entering some random channel’s ID that is already subscribed?
Every time someone entered a channel ID and got the reward, the channel ID would be put in a datastore which would be checked every time before rewarding the player.