如何在salesforce中刷新OAuth 2.0中的access_token

Bhu*_*dha 5 salesforce access-token oauth-2.0

我正在开发salesforce应用程序并使用OAuth 2.0登录.我有一个刷新令牌; 如何通过OAuth 2.0向salesforce发送包含特定用户刷新令牌的请求来获取新的access_token?

dot*_*kow 10

从" 深入挖掘到Force.com上的Oauth 2.0 ",您的应用程序可以通过将另一个请求发送到以下网址来获取新的访问令牌:https://login.salesforce.com/services/oauth2/token.有效负载的格式应为:grant_type = refresh_token&client_id = [您的客户端ID]&client_secret = [您的客户端密码]&refresh_token = [用户的刷新令牌].