简体   繁体   English

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

[英]How to refresh access_token in OAuth 2.0 in salesforce

I am developing a salesforce app and using OAuth 2.0 to login. 我正在开发salesforce应用程序并使用OAuth 2.0登录。 I have a refresh token; 我有一个刷新令牌; how do I get a new access_token by sending a request to salesforce via OAuth 2.0 containing the refresh token for a particular user? 如何通过OAuth 2.0向salesforce发送包含特定用户刷新令牌的请求来获取新的access_token?

Taken from " Digging Deeper into Oauth 2.0 on Force.com ", your application can obtain a new access token by POSTing another request to: https://login.salesforce.com/services/oauth2/token . 从“ 深入挖掘到Force.com上的Oauth 2.0 ”,您的应用程序可以通过将另一个请求发送到以下网址来获取新的访问令牌: https//login.salesforce.com/services/oauth2/token The payload should be of the form: grant_type=refresh_token&client_id=[your client id]&client_secret=[your client secret]&refresh_token=[the user's refresh token]. 有效负载的格式应为:grant_type = refresh_token&client_id = [您的客户端ID]&client_secret = [您的客户端密码]&refresh_token = [用户的刷新令牌]。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM