【发布时间】:2019-04-07 13:37:14
【问题描述】:
我想使用Purchase.Subscription API 获取订阅数据。为此,我试图从https://accounts.google.com/o/oauth2/token 获取令牌。
根据documentation,它应该返回以下回复:
{
"access_token" : "ya29.ZStBkRnGyZ2mUYOLgls7QVBxOg82XhBCFo8UIT5gM",
"token_type" : "Bearer",
"expires_in" : 3600,
"refresh_token" : "1/zaaHNytlC3SEBX7F2cfrHcqJEa3KoAHYeXES6nmho"
}
但是当我尝试执行相同的步骤时,我没有得到 refresh_token 字段作为响应。 我正在发送文档中提到的以下字段:
grant_type=authorization_code
code=<the code from the previous step>
client_id=<the client ID token created in the APIs Console>
client_secret=<the client secret corresponding to the client ID>
redirect_uri=<the URI registered with the client ID>
请帮我解决我所缺少的。
【问题讨论】:
-
请在此处发布您的一些代码
-
你会得到什么回报?
-
我已经在上面提到了响应与文档中描述的相同,除了 refresh_token 即将到来
标签: android google-play google-play-developer-api