Files
python----/智慧校园/统一开权限.ipynb
2025-10-20 12:32:18 +08:00

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 [ ]: