Lv.1
在 【Python作品分享】人工智能写诗 中回复
def get_token_key():
url = '喵喵喵'
data = {
'grant_type': 'client_credentials', # 固定值
'client_id': 'R9wzWhYqac9SX9ATmC6jnZeh', # 在开放平台注册后所建应用的API Key
'client_secret': 'dtFOvUymIAOslPEi0ar0qVRjv1x9G2ou' # 所建应用的Secret Key
}
res = requests.post(url, data=data)
res = res.json()
token_key = res['access_token']
return token_key2023-10-17T11:03:54 点赞:0