Tag: 谷歌的应用程式市集

使用UpgradableApp API时“401 Unauthorized”

我们正在开发我们的迁移工具,将现有的GAMv1用户转移到GAMv2,我们收到401 Unauthorized,报告我们的消费者密钥无效。 我们正在使用Google的APIClient ruby​​库,可在此处找到: https : //github.com/google/google-api-ruby-client/我很确定我们正在转发https中标识的同一组凭据:/ /developers.google.com/apps-marketplace/v1migratev2 ,我们正在为API指定两条腿的OAuth 1.0。 我们正在使用的代码如下,仅剥离授权位: @client = Google::APIClient.new( :authorization => :two_legged_oauth_1, :application_name => ‘App Name’, :application_version => ‘1.0’ ) @client.authorization.client_credential_key = ‘%s.apps.googleusercontent.com’ % Auth::Application::CONFIG[‘GOOGLE_GAMV1_APPLICATION_ID’] @client.authorization.client_credential_secret = Auth::Application::CONFIG[‘GOOGLE_GAMV1_SECRET’] @service = @client.discovered_api(‘appsmarket’, ‘v2’) request = @client.execute( @service.upgradable_app.update, ‘marketplaceListingId’ => Auth::Application::CONFIG[‘GOOGLE_GAMV1_LISTING_ID’], ‘domainName’ => account.domain, ‘cwsItemId’ => Auth::Application::CONFIG[‘GOOGLE_GAMV2_CWS_ID’] ) 查看日志我们有收益(我已经删除了私有细节,但我们几乎可以肯定我们有正确的client_id,client_secret,列表ID等): D, [2014-08-28T14:37:17.025667 #12517] […]