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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T15:59:18+00:00 2026-05-28T15:59:18+00:00

I m current developing an app for google plus. I want to fetch the

  • 0

I m current developing an app for google plus. I want to fetch the access token from google plus API. I want to use OAuth 2.0 to fetch the access token. I have constructed to URL

“https://accounts.google.com/o/oauth2/auth?client_id=752264386186-
72f3ef2ok1j3k8g12h7hg8k5kjt9s9si.apps.googleusercontent.com&scope=https:
//www.googleapis.com/auth/plus.me&redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=code”

which when I pasted to by browser asks to sign in with my google account. So when I enter my credentials it asks for “allow access” or “no thanks” . when I click “allow access” it gives me the access token in my browser. I want the above steps to be done using my C# code.

How I can navigate to authorisation page from code and fetch the access token once the authentication is sucessful. Should I use httpwebrequest or webclient or rest sharp. Please provide me some sample code also.

  • 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-28T15:59:19+00:00Added an answer on May 28, 2026 at 3:59 pm

    If using the WebBrowser is okay for you, here is a simple example how I did the same thing with Foursquare API. This code has been written only to test how it goes, so I’m sure it’s missing several important things like error handling etc.

     private void button1_Click(object sender, RoutedEventArgs e)
        {
            string address =
                "https://foursquare.com/oauth2/authenticate" +
                "?client_id=" + CLIENT_ID +
                "&response_type=token" +
                "&redirect_uri=" + CALLBACK_URI;
            webBrowser1.Navigated += new EventHandler<System.Windows.Navigation.NavigationEventArgs>(webBrowser1_Navigated);
            webBrowser1.Navigate(new Uri(address, UriKind.Absolute));
        }
    
        void webBrowser1_Navigated(object sender, System.Windows.Navigation.NavigationEventArgs e)
        {
            response = e.Uri.ToString();
            System.Diagnostics.Debug.WriteLine(e.Uri.ToString());
            if (response.LastIndexOf("access_token=") != -1)
            {
                string token = response.Substring(response.LastIndexOf("#access_token=") + "#access_token=".Length);
                System.Diagnostics.Debug.WriteLine("TOKEN: " + token);
            }
        }
    

    Once you have allowed access, you end up getting the callback URI with the access_token. Note that webBrowser1_Navigated might get called several (each time you are navigating to another page in the embedded web browser).

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

Sidebar

Related Questions

i am developing app in Blackberry which have GPS Functionality. so first i want
Am developing an app, which first gets the current date from DatePicker using Calendar.getInstance(),
i'm developing an android application similar to Google places app. I want a functionality
I'm developing an application on Google App Engine using the current django non-rel and
I'm developing an app for iOS that use the new Twitter framework. I have
If I understand this correctly: Current CPU developing companies like AMD and Intel have
I have been tasked with developing a new retail e-commerce storefront for my current
I'm developing an android app, I've requirement to show the user current location and
We're developing an app (using Grails Spring Security (formerly Acegi)) in which we'll have
Hello Everyone, I am developing an app which have to show all the restaurants

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.