问题描述
我正在开发salesforce应用,并使用OAuth 2.0登录。我有一个刷新令牌;如何通过OAuth 2.0向Salesforce发送包含特定用户刷新令牌的请求来获得新的access_token?
I am developing a salesforce app and using OAuth 2.0 to login. 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?
推荐答案
从 中,您的应用程序可以通过发布以下请求来获取新的访问令牌:。有效负载的格式应为:grant_type = refresh_token& client_id = [您的客户ID]& client_secret = [您的客户机密]& refresh_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. 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].
这篇关于如何在Salesforce中的OAuth 2.0中刷新access_token的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!