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 3281202
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T19:47:23+00:00 2026-05-17T19:47:23+00:00

I have an android app I want to connect to a Google App Engine

  • 0

I have an android app I want to connect to a Google App Engine based server. I can get the auth token from the AccountManager. It seems the next thing I am supposed to do is talk to an auth page to get a cookie. Following the awesome instructions here: http://blog.notdot.net/2010/05/Authenticating-against-App-Engine-from-an-Android-app
I think my url should be:

https://MYAPP.appspot.com/_ah/login?continue=http://localhost/&auth=CrAZYl000ngToken

but rather than a redirect, I get a 500 server error:

Error: Server Error

The server encountered an error and could not complete your request.
If the problem persists, please report your problem and mention this error message 
and the query that caused it.

What’s up with that? What is the URL I am supposed to be going to? Or maybe I’m doing something else wrong?

  • 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-05-17T19:47:23+00:00Added an answer on May 17, 2026 at 7:47 pm

    OK, the URL wasn’t wrong after all. The problem was that the token was expired. I was able to solve this by invalidating and re-fetching the token.

    private class GetAuthTokenTask extends AsyncTask<Account, Object, String> {
    
        @Override
        protected String doInBackground(Account... accounts) {
            AccountManager manager = AccountManager.get(getApplicationContext());
            Account account = accounts[0];
            String token = this.buildToken(manager, account);
            manager.invalidateAuthToken(account.type, token);
            return this.buildToken(manager, account);
        }
    
        private String buildToken(AccountManager manager, Account account) {
            try {
                AccountManagerFuture<Bundle> future = manager.getAuthToken (account, "ah", false, null, null);
                Bundle bundle = future.getResult();
                return bundle.getString(AccountManager.KEY_AUTHTOKEN);
             } catch (OperationCanceledException e) {
                    Log.w(TAG, e.getMessage());
             } catch (AuthenticatorException e) {
                    Log.w(TAG, e.getMessage());
             } catch (IOException e) {
                    Log.w(TAG, e.getMessage());
             }
             return null;
        }
    
        protected void onPostExecute(String authToken) {
            new GetCookieTask().execute(authToken);    
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want my android app to get data from an online database. Here are
I have an android app it displays web view.I want know the app idle
We have an Android app and a Web Service. We want to download part
I want to develop an Android app in which I have key log press.
I have a dialog in an Android app that I don't want the user
I am making an android app. I have a main activity and i want
I am building an android app, and I want to be able to have
I want to use MoPub for putting ads in my Android app. I have
I'm working on a relatively simple Android app. I want it to have an
I have an app that I want to develop for Android 2.1, 2.2, 2.3.3,

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.