Get token values using python code and Postman

I tried to get user api_key with code:

def get_key():    
    url = 'https://mydomain.id/api/resource/User'
    params = {
	    'fields': '["name","api_key"]',
	    'filters': '[["name", "=", "Administrator"]]'
    }
				
    r = requests.get(url, params=params)

but the result is empty json:

r.status code = 200
r.json = <bound method Response.json of <Response [200]>>
r.text = {'data': []}

When I try this url and parameter in Postman, I get the result:

{
	"message": {
			"name": "Administrator",
			"api_key": "b48d869ce03347d"
	}
}

What do I do wrong?
Thanks

And when trying to get the api_secret I use this code:

def get_secret():
	url = 'https://mydomain.id/api/method/frappe.core.doctype.user.user.generate_keys'
	params = {
		'user': 'Administrator'
	}
		
	r = requests.post(url, params=params)

and get the result:

r.status_code = 403
r.json = <bound method Response.json of <Response [403]>>

While using Postman this is what I get:

{
	"message": {
		"api_secret": "084e94a550a4e59"
	}
}