access token invalid or no longer valid

调用百度云开放API进行人脸识别:
access token invalid or no longer valid

import  requests
host='https://aip.baidubce.com/oauth/2.0/token?grant_type=client_credentials&client_id=DN3tVBfAPrN2lxRha2zZBQGE&client_secret=7cpVN2fGxwetkdo8mLbaBufq1EKm5W5A'
response=requests.get(host)
if response:
 print(response.json())
以上返回的结果如下:
{'refresh_token': '25.d262ee6c231c77ead27fc61465deeb2f.315360000.1901328967.282335-19249251', 'expires_in': 2592000, 
'session_key': '9mzdCKJCk3g2x0YpCGVPowauDnhPHogxqLOWyvK6qjvpCCyRBV1yZ/4VQRYP74LxNmMT+xuiY9PKdh75n2UsXrbhqI1FvQ==', 'access_token': '24.3f563b2238263d94446ca915d1e638c1.2592000.1588560967.282335-19249251', 'scope': 'public brain_all_scope vis-faceverify_faceverify_h5-face-liveness vis-faceverify_FACE_V3 vis-faceverify_idl_face_merge wise_adapt lebo_resource_base lightservice_public he

你可能感兴趣的:(python,机器学习)