JS Follow button API error

Where is the rest of your code, I can’t see where channel comes from…

The 404 with that message is indicative that you are trying to unfollow [channel] and you don’t follow [channel] in order to unfollow [channel]