【发布时间】:2012-06-09 01:36:30
【问题描述】:
我正在尝试使用用户名密码流程获取授权令牌(如this 文章的最后部分所述)。
我正在发送以下请求(使用 Python 的 httplib,以防万一):
https://login.salesforce.com/services/oauth2/token
POST data:
username=<un>&client_secret=<consumer_secret>&password=<pw+token>&grant_type=password&client_id=<consumer_key>
并得到响应:
400 Bad Request
{"error":"unsupported_grant_type","error_description":"grant type not supported"}
密码 grant_type 真的不受支持,还是我遗漏了什么?即使我发送肯定有效的grant_type(例如authorization_code),它似乎也会出现此错误。
请注意,我已经尝试了答案 here 中的建议,但它们对我不起作用。
【问题讨论】:
-
您能否发布您的代码和/或实际 http 请求的捕获。
标签: oauth passwords salesforce