401 invalid client error

Ah maybe the form data thing was a red herring. That’s what helped with the thread I linked. However doesn’t seem to be necessary in python/requests. Tbh I don’t see anything wrong with what you posted.

Sorry to keep posting threads, but here’s a python specific script, which doesn’t seem to differ all that much from yours: API Python recap/ help

Maybe there are some clues in there but idk