Skip to content
Advertisement

Python urllib3 doesn’t seem to be sending fields data

I am trying to utilise the authentication here: https://api.graphnethealth.com/system-auth using Python urllib3 and have the following

JavaScript

I get an error saying that grant_type has not been sent.

JavaScript

Any suggestions?

Advertisement

Answer

You’re telling it the data will be form-urlencoded, but that’s not what request does by default. I believe you need:

JavaScript

request replaces the Content-Type header, so there’s no point in specifying it at all.

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement