通过Alamofire进行salesforceApi集成



在通过Alamofire集成auth-api时,会出现错误。

http://test.salesforce.com/services/oauth2/token

Optional(["Content-Type": "application/x-www-form-urlencoded"]) 

参数:client_id=3MVG9e2mBbZnmM6lFmND2Ju7xFYp.iaixYWQ7tuDZKWs4Jqs9pxjm3kenjwAhG28yWavIReD9wkchzFaBcMO&client_secret=8967652660758155787&grant_type=密码&密码=qwerty%4012&用户名=xxxx%40yahoo.com

响应:

error="unsupported_grant_type";"errordescription"="不支持授予类型";

我正在通过POSTMAN得到回复,所以我缺少什么吗?

Salesforce在访问令牌请求中不支持JSON;OAuth 2.0规范要求应用程序/x-www-form-urlencoded。

最新更新