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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T22:48:50+00:00 2026-06-06T22:48:50+00:00

I have an android application and web-server working together. Now I want user log

  • 0

I have an android application and web-server working together. Now I want user log in via google from android application (or use one of the google accounts on android). Then andriod application passes token to my web-server with service call… and here I can’t realise how to get user email or profile data from google having that token.

I can make a call like this in my browser: https://www.googleapis.com/oauth2/v1/tokeninfo?access_token={accessToken}

But how to do that using google libraries? What library to use and so on?

  • 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-06T22:48:51+00:00Added an answer on June 6, 2026 at 10:48 pm

    Depending on which service you try to use, just pick the right one of Google’s Client Libraries and check out the Google+ Sample.

    The first half should be basically the same for all APIs. For getting the User info, you would need the oauth2 library and then do something like this (taken from this example):

    // Set up the HTTP transport and JSON factory
    HttpTransport httpTransport = new NetHttpTransport();
    JsonFactory jsonFactory = new JacksonFactory();
    
    // Set up OAuth 2.0 access of protected resources
    // using the refresh and access tokens, automatically
    // refreshing the access token when it expires
    GoogleAccessProtectedResource requestInitializer =
        new GoogleAccessProtectedResource(accessToken, httpTransport,
        jsonFactory, clientId, clientSecret, refreshToken);
    
    // set up global Oauth2 instance
    Oauth2 oauth2 = new Oauth2.Builder(httpTransport, jsonFactory, requestInitializer)
        .setApplicationName("Google-OAuth2Sample/1.0").build();
    
    Userinfo userinfo = oauth2.userinfo().get().execute();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm connecting to a web server from my android application via HttpsUrlConnection or HttpUrlConnection
I make multiple web requests from an Android application I'm working on. I want
I have an Android application from which I want to upload some data to
I'm working on Android project where I'm collecting some information from web server. Everytime
Now, I have a web application made using [html, asp.net, sql server,javascript & ajax].
I have a Web Service and an Android application that uses this web service.
I have a site where, via Android, a user needs to: fill in a
I have android application that is written regular way. layouts, java, APK. Now, depending
I have an application that will be accessing the web. I've decided to use
I have web services written using java which interacts with the android application only

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.