如何在Salesforce中的OAuth 2.0中刷新access_token [英] How to refresh access_token in OAuth 2.0 in salesforce

查看:185
本文介绍了如何在Salesforce中的OAuth 2.0中刷新access_token的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发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?

推荐答案

在Force.com上更深入地研究Oauth 2.0 中,您的应用程序可以通过发布以下请求来获取新的访问令牌: https://login.salesforce.com/services/ oauth2 / token 。有效负载的格式应为: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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆