我正在尝试使用官方文档中描述的客户端凭据授权流程对 Mendeley API 进行授权。
但是,当我尝试:
curl -X POST -H "Content-Type: application/x-www-form-urlencoded" -u 799:1K2757WBBkLr9DOs -d "grant_type=client_credentials&scope=all" https://api.mendeley.com/oauth/token
我得到这个回应:
{"message":"Credentials are required to access this resource."}
尝试其他选项:
curl -X POST -H "Content-Type: application/x-www-form-urlencoded" "https://api.mendeley.com/oauth/token?grant_type=client_credentials&scope=all&client_id=799&client_secret=1K2757WBBkLr9DOs"
没什么区别。