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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T13:02:42+00:00 2026-05-25T13:02:42+00:00

I am attempting to acquire a RequestToken for the LinkedIn API via oAuth. I

  • 0

I am attempting to acquire a RequestToken for the LinkedIn API via oAuth. I have tried numerous things and read all of the documentation I can find related to the topic, and consiquently tried all of the solutions I could think of.

The code I am using is as follows:

    public Dictionary<string, string> GetAccessToken()
    {

        Dictionary<string, string> tokens = new Dictionary<string, string>();
        string url = string.Format("https://api.linkedin.com/uas/oauth/requestToken");
        HttpWebRequest request = WebRequest.Create(url) as HttpWebRequest;

        string header = string.Format(@"OAuth oauth_nonce=""{0}"", oauth_signature_method=""{1}"", oauth_timestamp=""{2}"", oauth_consumer_key=""{3}"", oauth_signature=""{4}"", oauth_version=""{5}""",
        HttpUtility.UrlEncode(GenerateNonce()), HttpUtility.UrlEncode(getSignatureMethod()), HttpUtility.UrlEncode(GenerateTimeStamp()), HttpUtility.UrlEncode(getClientID()), HttpUtility.UrlEncode(getClientSecret()), HttpUtility.UrlEncode(getVersion()));

        request.Headers.Add("Authorization", header);
        request.Method = "POST";

        HRArtis_Security.MyProxy HRProxy = new HRArtis_Security.MyProxy();
        request.Proxy = HRProxy;
        using (HttpWebResponse response = request.GetResponse() as HttpWebResponse)
        {
            StreamReader reader = new StreamReader(response.GetResponseStream());
            string retVal = reader.ReadToEnd();

            foreach (string token in retVal.Split('&'))
            {
                tokens.Add(token.Substring(0, token.IndexOf("=")),
                    token.Substring(token.IndexOf("=") + 1, token.Length - token.IndexOf("=") - 1));
            }
        }
        return tokens;
    }

I then perform a POST to that URL.
The error occurs when trying to get the response with the line HttpWebResponse response = request.GetResponse() as HttpWebResponse

Another option I tried was adding those parameters to the header with no result.

Am I missing something or being an idiot?

  • 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-25T13:02:43+00:00Added an answer on May 25, 2026 at 1:02 pm

    Seems to me you have misconfigured oAuth header. I suggest you to use Hammock or RestSharp library to authorize with LinkedIn. Here are several examples how to do this: Hammock and RestSharp (LinkedIn and Twitter both are using oAuth v1.0).

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

Sidebar

Related Questions

Attempting to use the amazon API to obtain product data and currently failing miserably.
Attempting to do TDD, I often need to execute all my tests - in
I am attempting to simply acquire the user's GPS location, but my application crashes
Attempting to render a model object into a JSON structure via a partial, like
Attempting to get an answer to this question. How can I turn off the
Attempting the most basic example of Knockout.js possible on their documentation page: http://knockoutjs.com/documentation/observables.html Looks
I'm attempting to use an XBAP to acquire TWAIN Images but I'm not even
Attempting to do some asynchronous programming via threads. To start with, I am trying
Attempting to insert an escape character into a table results in a warning. For
Attempting to print out a list of values from 2 different variables that are

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.