It seems OAuth2 hasn't implemented yet. At this time,
to get auth
value, username and password are required:
# Python
url = 'https://<instance_name>/user/login'
data = {'username_or_email': username_or_email,
'password': password}
response = requests.post(url, json=data)
json = response.json()
auth = json['jwt']
Since the endpoint recieves JSON then returns JSON, you may need to send following HTTP headers explicitly:
Content-Type: application/json
Accept: application/json