使用OAuth进行用户身份验证在Java和Php中不起作用 [英] User Authentication with OAuth In Java and Php Not working
问题描述
我们有两个不同的Bingads帐户。哪个有多个帐户。我们之前从未遇到过这个问题。由于几天我无法获取"访问令牌"使用"Refreshtoken"。我们不知道这可能是个问题。
我们最近更改为V10,但它适用于v10太多。
使用我们发送的httpclient请求并收到回复。我们不使用客户端库。最近有什么事情发生了变化,我可能在发送请求时错过了更新。我发送请求时设置了400状态响应。
唯一可行的方法是,登录
https://login.live.com/oauth20_authorize.srf?client_id=000000004#####&scope=bingads.manage&response_type = code& redirect_uri = redirectl_url_to_our_site
但是当访问令牌到期时以及我们发送请求以获取访问令牌时。
POST https://login.live.com/oauth20_token.srf HTTP / 1.1
接受:application / json
内容类型:application / x-www-form-urlencoded
主持人:login.live.com
内容长度:167
client_id = 000A1A1A1& grant_type = refresh_token& redirect_uri = redirectl_url_to_our_site& refresh_token = dsa987gfs890d89g8e89we ...
如果我需要更新,请告诉我。
临屋提前预订
/ Javeed
请确保您对代码和刷新令牌请求使用相同的Client_Id。如果您仍然被阻止,我建议升级以支持仔细查看您尝试使用的凭据。
祝您好运,
Eric
Hi,
We have two different account for Bingads. Which has multiple accounts. We never had this issue before. Since couple of days i cannot able to fetch "Access token" using "Refreshtoken". We have no idea that could be the issue. We have recently changed to V10 but it was working for v10 tooo.
Using httpclient we send request and recieved Response. We do not use client Library. IS there any thing changed recently which i might have missed ot update while sending request. I set 400 status response when i send the request.
The only way it works is, signing into
https://login.live.com/oauth20_authorize.srf?client_id=000000004#####&scope=bingads.manage&response_type=code&redirect_uri=redirectl_url_to_our_site
But then when the access token get expire and when we send Request to get access token.
POST https://login.live.com/oauth20_token.srf HTTP/1.1 Accept: application/json Content-Type: application/x-www-form-urlencoded Host: login.live.com Content-Length: 167 client_id=000A1A1A1&grant_type=refresh_token&redirect_uri=redirectl_url_to_our_site&refresh_token=dsa987gfs890d89g8e89we...
Please let me know if there is any thing i need to update.
Thank you in advance
/Javeed
Please be sure that you are using the same Client_Id for both the code and refresh token requests. If you are still blocked I suggest escalating to support for a closer look at the credentials you are attempting to use.
Best regards,
Eric
这篇关于使用OAuth进行用户身份验证在Java和Php中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!