Oauth_problem signature_invalid

I am following the documentation found here:
https://developer.atlassian.com/server/jira/platform/oauth/
I have tried with the provided code in Java, PHP and Python.
They always return 401 Unauthorized on the first step.

Here is the response in Python:
{‘x-oneagent-js-injection’: ‘true’, ‘www-authenticate’: ‘OAuth realm=“https%3A%2F%2Fredacted%3A8443”, OAuth realm=“https%3A%2F%2Fredacted%3A8443”, oauth_problem=“signature_invalid”, oauth_signature=“redacted”, oauth_signature_base_string=“POST%26https%253A%252F%252Fredacted%253A8443%252Fplugins%252Fservlet%252Foauth%252Frequest-token%26oauth_consumer_key%253Dredacted%2526oauth_nonce%253D22323312%2526oauth_signature_method%253DRSA-SHA1%2526oauth_timestamp%253D1563304508%2526oauth_version%253D1.0”, oauth_signature_method=“RSA-SHA1”’, ‘content-type’: ‘application/x-www-form-urlencoded;charset=UTF-8’, ‘transfer-encoding’: ‘chunked’, ‘date’: ‘Tue, 16 Jul 2019 19:15:07 GMT’, ‘status’: ‘401’}