Server Error, HTTP Response 206: User Authentication Flow via Python

Child Item
Child Item
Child Item

Accepted answers

All comments

That request is getting a website; not a json object. The Authorization Code Flow is more complex than your code.

Also, the header should be: headers = {"Content-Type": "application/x-www-form-urlencoded"}.

Because it returns html code, and not json, .json() causes an error.

Just replace the header, remove .json(), try print out the response with print(code.text), and see it for yourself.

Child Item
Child Item