首页 > 解决方案 > 使用 cURL 向 API REST 验证 OAuth2

问题描述

我这里有个小问题。我一直在尝试使用 cURL 命令对 REST API 进行身份验证(协议 OAuth2)。我使用以下命令行:

curl -X POST -d "client_id=login_id&client_secret=password&grant_type=client_credentials" http://localhost:9001/rest/oauth/token

但它不起作用,命令返回:

{"status":"error","message":"Parameter is required for method Load."}

但我不知道他们正在谈论的参数。你知道问题可能来自哪里吗?

标签: shellrestcurloauth-2.0

解决方案


推荐阅读