Google Play 开发者 API 文档参考: https ://developers.google.com/android-publisher/api-ref/purchases/subscriptions/get
我正在使用Purchases.subscriptions: get
方法
我已经使用 GetPostMan 和 Unirest PHP 调用了请求:
GET https://www.googleapis.com/androidpublisher/v2/applications/packageName/purchases/subscriptions/subscriptionId/tokens/token
但返回:
{
"error": {
"errors": [
{
"domain": "global",
"reason": "required",
"message": "Login Required",
"locationType": "header",
"location": "Authorization"
}
],
"code": 401,
"message": "Login Required"
}
}
它需要我先授权,这很难理解文档。
我正在使用 Laravel 4.2。
使用 Amazon ec2 Linux
我的目标是在我的应用程序中获取订阅用户的状态,如果用户已付费、过期等。
我已经这样做了:https ://developers.google.com/android-publisher/authorization
创建了我的项目,打开 Google Play Android Developer API 并创建客户端 ID。我不知道下一步该做什么。