10
Quando faccio la seguente richiesta, Google restituisce solo l'errore 503 e non fornisce alcuna informazione utile.Ottieni l'ora di scadenza dell'API di abbonamento a Google Android per un token di abbonamento.
Sto seguendo la documentazione qui: https://developers.google.com/android-publisher/v1/purchases/get
Il token di autorizzazione è stato recentemente aggiornato (automaticamente). (Normalmente dice 401 quando è stantio.)
[[email protected] cgi-bin]# wget -dSO- 'https://www.googleapis.com/androidpublisher/v1/applications/com.kizbit.pairfinder/subscriptions/subscription99/purchases/vkorjajxnjfyhxbftpymwfox?access_token=ya29.AHES6ZSnxLdOVf2QWrX96VbpDMdUKlHFXJOFEdHM_f_ErQlL'
Setting --server-response (serverresponse) to 1
Setting --output-document (outputdocument) to -
DEBUG output created by Wget 1.12 on linux-gnu.
--2012-07-05 00:09:46-- https://www.googleapis.com/androidpublisher/v1/applications/com.kizbit.pairfinder/subscriptions/subscription99/purchases/vkorjajxnjfyhxbftpymwfox?access_token=ya29.AHES6ZSnxLdOVf2QWrX96VbpDMdUKlHFXJOFEdHM_f_ErQlL
Resolving www.googleapis.com... 2001:4860:b007::5f, 74.125.142.95
Caching www.googleapis.com => 2001:4860:b007::5f 74.125.142.95
Connecting to www.googleapis.com|2001:4860:b007::5f|:443... connected.
Created socket 3.
Releasing 0x0000000000cc9370 (new refcount 1).
Initiating SSL handshake.
Handshake successful; connected socket 3 to SSL handle 0x0000000000cd8e70
certificate:
subject: /C=US/ST=California/L=Mountain View/O=Google Inc/CN=*.googleapis.com
issuer: /C=US/O=Google Inc/CN=Google Internet Authority
X509 certificate successfully verified and matches host www.googleapis.com
---request begin---
GET /androidpublisher/v1/applications/com.kizbit.pairfinder/subscriptions/subscription99/purchases/vkorjajxnjfyhxbftpymwfox?access_token=ya29.AHES6ZSnxLdOVf2QWrX96VbpDMdUKlHFXJOFEdHM_f_ErQlL HTTP/1.0
User-Agent: Wget/1.12 (linux-gnu)
Accept: */*
Host: www.googleapis.com
Connection: Keep-Alive
---request end---
HTTP request sent, awaiting response...
---response begin---
HTTP/1.0 503 Service Unavailable
Content-Type: application/json; charset=UTF-8
Date: Thu, 05 Jul 2012 04:09:56 GMT
Expires: Thu, 05 Jul 2012 04:09:56 GMT
Cache-Control: private, max-age=0
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
Server: GSE
---response end---
HTTP/1.0 503 Service Unavailable
Content-Type: application/json; charset=UTF-8
Date: Thu, 05 Jul 2012 04:09:56 GMT
Expires: Thu, 05 Jul 2012 04:09:56 GMT
Cache-Control: private, max-age=0
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
Server: GSE
Closed 3/SSL 0x0000000000cd8e70
2012-07-05 00:09:47 ERROR 503: Service Unavailable.
Hai già risolto questo problema? Ho sperimentato lo stesso problema. – tszming
Sì, ma non so come. Ha appena iniziato a funzionare. Penso che sia uno dei seguenti: 1) Il token di accesso è valido solo per un tempo molto breve, forse 10 secondi, quindi devi usare uno script o un codice per autenticare e recuperare i dettagli in successione. 2) Il pacchetto deve essere pubblicato. 3) Il token di abbonamento deve essere reale e pagato. 4) L'ID della sottoscrizione deve essere pubblicato. – Chloe
sì, sembra che Google abbia risolto il problema. – tszming