1.2 KiB
1.2 KiB
In [2]:
from requests import get,post
param = {
"username": "zhongwei",
"password": "123456a",
"client_id": "client",
"grant_type": "password",
"client_secret": "123456",
}
# ip = "http://192.168.0.244:8100"
ip = "https://band.hxzhxy.cn"
data = get(url=f"{ip}/oauth/token", params=param).json()
token = data["access_token"]
header = {"Authorization": f"Bearer {token}"}In [ ]: