python的调用接口,返回401
Ta的回复 :# encoding:utf-8 import requests # client_id 为官网获取的AK, client_secret 为官网获取的SK host = 'https://aip.baidubce.com/oauth/2.0/token?grant_type=client_credentials&client_id=DFMpx&client_secret=OvGiQFoAeV7' print(host) response = requests.get(host) print(response) if response: print(response.json())