简体   繁体   English

Salesforce刷新令牌OAuth

[英]Salesforce Refresh Token OAuth

I am trying to refresh the access token using the refresh token: 我正在尝试使用刷新令牌刷新访问令牌:

curl https://login.salesforce.com/services/oauth2/token -d "grant_type=refresh_token&client_id=3MVG9pHRjzOBdkd.WU9DLyfznP.sjOJRXXX_00nLDYSpM_0K7zAOsLrRKf6IWmCv6MxeTorXL7Zzaaea8IXXX&client_secret=3231123171523457&refresh_token=5Aep861VUUSqKxtr91VaZ7Zh54RmFqHE6zD4htOq6vY9edPgkgm9ZeFPwHIzQQvR__XypcEvWnXXX==&format=json"

But I keep getting the error "error_description":"expired access/refresh token" 但我一直收到错误"error_description":"expired access/refresh token"

Anyone have any idea? 任何人都有任何想法?

I know this is old, but for people that may stumble on this. 我知道这已经过时了,但对于那些可能偶然发现的人来说。 I believe this issue is that you can only have 5 access grants per applications . 我相信这个问题是每个应用程序只能有5个访问权限 After this it starts revoking refresh tokens from the oldest one. 在此之后, 它开始 从最旧的一个撤消刷新令牌。 More info here: 更多信息:

You have the correct syntax for using a refresh token. 您具有使用刷新令牌的正确语法。 Make sure all of your parameters are URL encoded, since in your example your refresh token has = instead of %3D. 确保所有参数都是URL编码的,因为在您的示例中,您的刷新令牌具有=而不是%3D。

You can also delete the user's refresh token by going to that user's User Detail page inside of setup and revoking the "Remote Access" near the bottom. 您还可以通过转到设置中该用户的“用户详细信息”页面并撤消底部附近的“远程访问”来删除用户的刷新令牌。 Then obtain a new refresh token by going through the oauth flow again and try it in the curl command. 然后再次通过oauth流获取新的刷新令牌,并在curl命令中尝试。

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

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