I did do that, but order matters. If you put “Authorization” before “Client-ID”, it seems to care. Which is really bizarre, considering that “headers” is a dict. Anyway, here is github repo with working code for the next poor soul who has similar problems:
Also, I don’t recommend the following syntax:
"String" + variable
It’s not idiomatic Python, and produces fragile code. For an example of why it’s bad, see this:
>>> "String" + 1
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: cannot concatenate 'str' and 'int' objects