2013-05-18 23 views
12

Pythonコードを見つけようとしています: http://developer.android.com/google/gcm/ccs.html 正しいデータで最初の2行を変更しました。 projectnrとapiの鍵は偽物ですが、見た目がどのようになっているかを示すだけです。Google CCS(GCM) - ホワイトリストに登録されていないプロジェクト

import sys, json, xmpp 
SERVER = ('gcm.googleapis.com', 5235) 
USERNAME = '489713985816' 
PASSWORD = 'AIzd237jjN_iT7yRxLWiHRreqax45XaMJQ6VJ98' 

Google apiプロジェクトを作成しました(2つのプロジェクトで試しました)。 GCMを有効にしました。 プロジェクト番号:489713985816 APIキー:AIzd237jjN_iT7yRxLWiHRreqax45XaMJQ6VJ98 特定のIPアドレスの有無にかかわらず、サーバーのキーとブラウザアプリのキーでコードを試してみました。

#python ccs.pyでコードを実行すると、次の結果が得られます。 これは私の問題ですが、プロジェクトをホワイトリストに登録するにはどうすればよいですか?

Invalid debugflag given: socket 
DEBUG: 
DEBUG: Debug created for /usr/lib/python2.7/dist-packages/xmpp/client.py 
DEBUG: flags defined: socket 
DEBUG: socket  start Plugging <xmpp.transports.TCPsocket instance at 0x1ea2950> 
into  <xmpp.client.Client instance at 0x1ea27a0> 
DEBUG: socket  start Successfully connected to remote 
host ('gcm.googleapis.com', 5235) 
DEBUG: socket  sent <?xml version='1.0'?> 
<stream:stream xmlns="jabber:client" to="gcm.googleapis.com" version="1.0" 
xmlns:stream="http://etherx.jabber.org/streams" > 
DEBUG: socket  got 
<stream:stream from="gcm.googleapis.com" id="FD82304ADA8C8019" version="1.0" 
xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client"> 
<stream:features> 
<mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"> 
<mechanism>X-OAUTH2</mechanism> 
<mechanism>X-GOOGLE-TOKEN</mechanism> 
<mechanism>PLAIN</mechanism> 
</mechanisms> 
</stream:features> 
DEBUG: socket  sent <auth xmlns="urn:ietf:params:xml:ns:xmpp-sasl" 
mechanism="PLAIN">MjgzMVqTl9p\nVDdUTZWSjk4\n</auth> 
DEBUG: socket  got <failure xmlns="urn:ietf:params:xml:ns:xmpp-sasl"> 
<temporary-auth-failure/> 
<text xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"> 
Project 489713985816 not whitelisted.</text> 
</failure> 
</stream:stream> 
Authentication failed! 
+0

私は「プロジェクトがホワイトリストに登録されていません」という理由を知っていると思います。 サービスは公開されておらず、まずサインアップする必要があります:https://services.google.com/fb/forms/gcm/準備ができたら、このチケットにサインアップして更新しました。 – Gaston

+0

運がいいですか?私は、新しいサーバーの承認にどれくらいの時間がかかっているか興味を持っています。新しいGoogle Cloud PHPホスティングで24時間以内にリクエストが承認されました。 – simbolo

+0

10日後に承認されません。 – Gaston

答えて

2

マニュアルでは、アップストリームメッセージングを使用するのに数回言及されていますが、許可を求める必要があります(ホワイトリストに登録する必要があります)。

あなたはここでそれを行うことができます:https://services.google.com/fb/forms/gcm/

あなたはまだ古い「クラウドデバイスへの」メッセージングを使用することができます。 You can read more about this, including links to a sample project here

+0

私はサインアップしようとしました:私は "内部サーバーエラー - 500'を取得します。クールではありません。 –

3

3ヶ月の待ってから、私はGoogleの従業員からメールを受け取りました。 GCMホワイトリストのリクエストが承認されました。 ありがとうございました。 今、楽しく始めましょう!

関連する問題