Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
314 views
in Technique[技术] by (71.8m points)

whitelist - Google CCS (GCM) - project not whitelisted

I'm trying to get the Python code working that I found on: http://developer.android.com/google/gcm/ccs.html I've change the first 2 rows with (I think) the correct data. The projectnr and api key is fake, it's just to show you how it almost looks.

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

I've created a google api project (tried it with 2 different projects). Activated GCM. Copied the following: Project Number: 489713985816 API key : AIzd237jjN_iT7yRxLWiHRreqax45XaMJQ6VJ98 Tried the code with a Key for server, and a key for browser apps, both with and without a specific IP address.

When I execute the code with #python ccs.py I get the following result: If this is my problem, how do I get my project whitelisted?

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
VDdUTZWSjk4
</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!
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...