无法刷新访问令牌并使用OAuth对报告进行身份验证 [英] Unable to refresh access token and authenticate to reports using OAuth

查看:92
本文介绍了无法刷新访问令牌并使用OAuth对报告进行身份验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用OAuth成功验证后,授权代码授予流程"并在我的数据库中存储访问
令牌和刷新令牌我无法刷新令牌或使用访问令牌拉取报告(访问令牌是新的,但尚未到期)。

After successfully authenticating using the OAuth "Authorization Code Grant Flow" and storing the access token and refresh token in my database I am unable to to refresh the token or pull reports using the access token (the access token is new and did not expire yet).

在刷新流程中,我收到以下消息:

'error'=>字符串'invalid_grant'

'error_description'=> string'输入参数'refresh_token'的提供值无效。'

'error' => string 'invalid_grant'
'error_description' => string 'The provided value for the input parameter 'refresh_token' is not valid.'

我检查了所有内容是否正确发送。 

I checked everything is sent correctly. 

Url:   https://login.live.com/oauth20_token.srf

方法:POST

参数:

Url: https://login.live.com/oauth20_token.srf
Method: POST
Parameters:

'grant_type':'refresh_token',

'chush_token':'REFRESH_TOKEN',

'client_id':'CLIENT_ID',

'client_secret':'CLIENT_SECRET',

'redirect_uri':'REDIRECT_URI'

'grant_type' : 'refresh_token',
'refresh_token' : 'REFRESH_TOKEN',
'client_id' : 'CLIENT_ID',
'client_secret' : 'CLIENT_SECRET',
'redirect_uri' : 'REDIRECT_URI'

我也是试图提取报告并获得以下身份验证错误:

I also tried to pull reports and got the following authentication error:

无效的客户端数据。检查SOAP故障详细信息以获取更多信息

Invalid client data. Check the SOAP fault details for more information

105 InvalidCredentialsAuthentication失败。提供的凭据无效或帐户无效

105 InvalidCredentialsAuthentication failed. Either supplied credentials are invalid or the account is inactive


推荐答案

关于刷新错误,看起来好像您可能没有指定正确的刷新令牌。我还没有尝试过这样的重复。

Regarding the refresh error, it appears as if you might not have specified the correct refresh token. I have not tried a repro of this yet.

如果您还没有将Microsoft帐户用户链接到Bing Ads帐户,可能会解释105错误,如
中所述
本指南

The 105 error might be explained if you did not yet link the Microsoft account user to a Bing Ads account, as described in this guide.

我希望这有帮助!


这篇关于无法刷新访问令牌并使用OAuth对报告进行身份验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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