Announcements

Help Wizard

Step 1

NEXT STEP

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

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

Reply
1 Reply

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.

Suggested posts