Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8042125
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T04:28:20+00:00 2026-06-05T04:28:20+00:00

I set up a simple Servlet for interacting with my Android app using C2DM.

  • 0

I set up a simple Servlet for interacting with my Android app using C2DM.

From the Servlet I just log in to Google Accounts by doing a post to https://www.google.com/accounts/ClientLogin and sending these parameters in the body:

Email, Passwd, accountType, source and service (set to ac2dm).

I get the Auth, SID and LSID in reponse.

Right now my Servlet is being modified and deployed, and everytime I send the device registration ID from the mobile I login again to Google Accounts. I wonder if I have to logout before doing login again, or if there is no need to perform the login again.

I’ve been looking for some logout URL and I just found https://www.google.com/accounts/Logout but I have no idea on what parameters I have to send.

So my questions are, is my login a good approach? Do I have to relogin? If yes, I guess I have to logout first, so what parameters is the server expecting?

Any comment would be appreciated 😉

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T04:28:22+00:00Added an answer on June 5, 2026 at 4:28 am

    You don’t need to logout. When you perform the login when already logged in, you’ll typically get a different Auth, SID and LSID. The old Auth, SID, LSID and the new ones are both valid and can still be used. The authorization will expire after some time (days) and then you have to re-login off course.

    Currently I’m looking for a method to force logout, so that all authorization codes retrieved earlier are blocked.

    You can verify this yourself using CURL:

    curl https://www.google.com/accounts/ClientLogin -d "Email=YourAccount" -d "Passwd=YourPassword" -d "accountType=GOOGLE" -d "source=Google-cURL-Example" -d "service=ac2dm"
    
    curl --header "Authorization: GoogleLogin auth=YourAuth" "https://android.apis.google.com/c2dm/send" -d registration_id=YourPhoneRegistrationID -d "data.payload=YourMessage" -d collapse_key=0
    

    On success curl will return a message id (id=…), otherwise with an error.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm developing a simple servlet/JSP, data-driven web site on Google App Engine. I've started
Using AngularJS if I set a simple input text box value to something like
I use bottle framework to set up simple web service. When submitting data from
just set up a simple project to test the functionality of the maven exec
Im sure its something simple, but i cant seem to set variable data from
ive set up a simple exception handler in my spring 2.5 app. Currently it
Pretty simple set-up here, I'm just trying to get two divs to sit side-by-side.
I am playing with Google's AppEngine Java support. I have a fairly simple set
I have set up i18n to my web app using Spring.It works fine.But I
If I want to set up simple CGI application which would work on any

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.