API for Authentication

Here we go:

import requests as rq

data = {		'grant_type': 'password',
						'username': 'asdadsasd',
						'password': 'asdasdas',
						'client_id': 'asdasdasdasd' }
resp = rq.post(	'https://online-go.com/oauth2/token/', data=data)
print(resp.text)

gives out:

{"access_token": "EUy8ClWonvnKoG3YXyLp00nJ2n4lQL", "expires_in": 36000, "token_type": "Bearer", "scope": "read write groups", "refresh_token": "gjMhCaSbJcXgAJOzwwY9iVQkTqQItL"}

Thanks again!

1 Like