Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Let me try it (with curl only):</p> <p>At first we are applying for the auth token:</p> <p><code>curl.exe -v -k <a href="https://www.google.com/accounts/ClientLogin" rel="nofollow">https://www.google.com/accounts/ClientLogin</a> -d Email=xyz@gmail.com -d Passwd=secret -d accountType=GOOGLE -d source=your.registered.domain -d service=ac2dm</code></p> <p>In the result your are receiving the auth token:</p> <p><code>&lt; HTTP/1.1 200 OK<br> SID=XXX<br> LSID=XXX<br> Auth=XXX<br> * Connection #0 to host www.google.com left intact<br> * Closing connection #0<br> * SSLv3, TLS alert, Client hello (1):</code></p> <p>Please note that the Auth response is in the result with an uppercase first letter: "Auth=XXX"!</p> <p>Now we are using the result for the next request but with lowercase first letter:<br> <code>curl.exe -v -k --header "Authorization: GoogleLogin <strong>auth</strong>=XXX" <a href="https://android.apis.google.com/c2dm/send" rel="nofollow">https://android.apis.google.com/c2dm/send</a> -d "registration_id=XXX" -d "data=helloooo" -d collapse_key=Z</code></p> <p>And this works! But you are getting a 401 error, if you are using the auth like in the first response (upper case A in "Auth"):</p> <p><code>curl.exe" -v -k --header "Authorization: GoogleLogin <strong>Auth</strong>=XXX" <a href="https://android.apis.google.com/c2dm/send" rel="nofollow">https://android.apis.google.com/c2dm/send</a> -d "registration_id=XXX" -d "data=helloooo" -d collapse_key=Z</code></p> <p>So the "auth" of request 2 is case sensitive. I think this is a pitfall 50% of the users are stepping into. Hope that helps.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload