douzhi1879 2014-01-15 19:54
浏览 55
已采纳

在哪里可以在Appengine或android上的App Billing v3 api中获得令牌?

Reading the documentation it is unclear to me how to get a token from either android or appengine endpoint server? I assume they mean by token a oauth2 access token?

https://developers.google.com/android-publisher/v1_1/ http://developer.android.com/google/play/billing/gp-purchase-status-api.html

I did setup a client id like this

console

In javascript I can get a access token gapi.auth.getToken().access_token. But is it the same token? What scope do I need? Is there a API I need to activate in the console?

On appengine I only know how to get a email from the user.

var clientids = []string{WEB_CLIENT_ID, ANDROID_CLIENT_ID_d, ANDROID_CLIENT_ID_r, endpoints.ApiExplorerClientId}
var audiences = []string{WEB_CLIENT_ID}
var google_scopes = []string{"https://www.googleapis.com/auth/userinfo.email"}

func (s *Service) Google(r *http.Request, req *NoRequest, resp *User) error {
        c := endpoints.NewContext(r)
        g, err := endpoints.CurrentUser(c, google_scopes, audiences, clientids);
        if err != nil {return err}
        resp.Email=g.String()
        return nil
}

Can you provide me more info about the token I must use to verify a purchase (in-app-billing v3)?

  • 写回答

1条回答 默认 最新

  • doutuo1939 2014-01-16 04:55
    关注

    Never mind I found it, mist this reference :) https://developers.google.com/android-publisher/authorization

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 乘性高斯噪声在深度学习网络中的应用
  • ¥15 运筹学排序问题中的在线排序
  • ¥15 关于docker部署flink集成hadoop的yarn,请教个问题 flink启动yarn-session.sh连不上hadoop,这个整了好几天一直不行,求帮忙看一下怎么解决
  • ¥30 求一段fortran代码用IVF编译运行的结果
  • ¥15 深度学习根据CNN网络模型,搭建BP模型并训练MNIST数据集
  • ¥15 C++ 头文件/宏冲突问题解决
  • ¥15 用comsol模拟大气湍流通过底部加热(温度不同)的腔体
  • ¥50 安卓adb backup备份子用户应用数据失败
  • ¥20 有人能用聚类分析帮我分析一下文本内容嘛
  • ¥30 python代码,帮调试,帮帮忙吧