Where to put from_id and to_id?

def followChannel(name):
    username, userId = user(oauth)
    channelId = getChannelId(name)

    URL = f"https://api.twitch.tv/helix/users/follows"
    Headers = {"Accept": "application/vnd.twitchtv.v5+json", "Client-ID": clientId, "Authorization": "Bearer " + oauth}

    r = requests.get(URL, headers=Headers)

    data = r.json()

I get the error {'error': 'Bad Request', 'status': 400, 'message': 'Must provide either from_id or to_id'}

I am not sure where to put the from_id and to_id parameters. Any clue?


  1. there is no need to ping me
  2. Duplicate of Follow Not Found

TLDR: Please don’t make duplicate posts, since you already asked this on your other thread. And please don’t ping me there is no need to when you are replying in a thread that you hit reply in, and please do do one word replies that are pinging people. People help out on the forums when they can.