HTTP/1.1 401 Unauthorized error when calling HttpGet with OAuthConsumer client










0














I am getting 401 Unauthorized error when i use Http GET call with OAuthConsumer client.



I have all the required parameters for Oauth 1.0 authorization.



Consumer Key = "XXX"
Consumer Secret = "YYY"
oauth_signature_method = "HMAC-SHA1"
oauth_timestamp = "calculated timestamp"
oauth_nonce = "calculated nonce"
oauth_version = 1.0
oauth_signature = "calculated signature"


The same Ouath 1.0 code in python is working well for me just by using consumer key, secret and signature_type='auth_header' and by calling requests.get(). Here's my python code below :



import requests
from requests_oauthlib import OAuth1

url = "XXX"
header_auth = OAuth1('consumer_key','consumer_secret', signature_type='auth_header')
response = requests.get(url, auth=header_auth)
print(response.status_code)
print(response.content)


Here is my code snippet in Java. Could you please suggest where I am going wrong?



public class OauthConsumerClient



@SuppressWarnings("deprecation")
public static void main(String args)

String url = "XXX";

DefaultHttpClient httpClient = new DefaultHttpClient();
httpClient.getParams().setParameter("http.protocol.content-charset", "UTF-8");
HttpRequestBase httpRequest = null;
URI uri = null;
HttpResponse httpResponse = null;
OAuthConsumer oAuthConsumer = new CommonsHttpOAuthConsumer("consumer_key", "consumer_secret");
oAuthConsumer.setSigningStrategy(new AuthorizationHeaderSigningStrategy());

try
uri = new URI(url);
httpRequest = new HttpGet(uri);
httpRequest.setHeader("Content-Type", "application/json");
oAuthConsumer.sign(httpRequest);
HttpHost target = new HttpHost(uri.getHost(), -1, uri.getScheme());
httpResponse = httpClient.execute(target, httpRequest);
System.out.println("Connection status : " + httpResponse.getStatusLine());
System.out.println("Connection status code : " + httpResponse.getStatusLine().getStatusCode());

catch (Exception e)
System.out.println("Exception occured");

InputStream inputStraem = httpResponse.getEntity().getContent();
StringWriter writer = new StringWriter();
IOUtils.copy(inputStraem, writer, "UTF-8");
String output = writer.toString();
System.out.println("Connection response : " + output);





Output 
-------------------------------------------------------------------------

16:13:43.064 [main] DEBUG o.a.h.impl.client.DefaultHttpClient - Authentication required
16:13:43.064 [main] DEBUG o.a.h.impl.client.DefaultHttpClient - "URL" requested authentication
16:13:43.064 [main] DEBUG o.a.h.i.c.TargetAuthenticationStrategy - Authentication schemes in the order of preference: [Negotiate, Kerberos, NTLM, Digest, Basic]
16:13:43.064 [main] DEBUG o.a.h.i.c.TargetAuthenticationStrategy - Challenge for Negotiate authentication scheme not available
16:13:43.064 [main] DEBUG o.a.h.i.c.TargetAuthenticationStrategy - Challenge for Kerberos authentication scheme not available
16:13:43.064 [main] DEBUG o.a.h.i.c.TargetAuthenticationStrategy - Challenge for NTLM authentication scheme not available
16:13:43.064 [main] DEBUG o.a.h.i.c.TargetAuthenticationStrategy - Challenge for Digest authentication scheme not available
16:13:43.064 [main] DEBUG o.a.h.i.c.TargetAuthenticationStrategy - Challenge for Basic authentication scheme not available
Connection status : HTTP/1.1 401 Unauthorized
Connection status code : 401
16:13:43.076 [main] DEBUG org.apache.http.wire - << " ["The request must be signed"]"
16:13:43.076 [main] DEBUG o.a.h.i.c.BasicClientConnectionManager - Releasing connection org.apache.http.impl.conn.ManagedClientConnectionImpl@78691363
16:13:43.076 [main] DEBUG o.a.h.i.c.BasicClientConnectionManager - Connection can be kept alive indefinitely
Connection response : ["The request must be signed"]


NOTE : When i hit the same URL in postman with Oauth 1.0 authorization type. I am getting response code 200 OK with the body.



Let me know if you need additional information. Thank you so much for your help !!!










share|improve this question























  • Not enough information to answer correctly, but seems that you are not getting the authentication header as you should. You first need to hit the oAuth URL, get you header then include it in the actual request. OAuth is different than Basic authentication, you need to authenticate prior to the request and carry the authentication token as long as it is valid. Quick video explaining the basics: youtube.com/watch?v=CPbvxxslDTU
    – lauksas
    Nov 12 at 12:51











  • I have edited my question with some more information. Please let me know if you need more info.
    – Manudatta G
    Nov 13 at 7:03










  • You are omitting imports, OAuthConsumer which seems to be an interface, doesn't tell me much. Maybe you are using RESTEasy? What does CommonsHttpOAuthConsumer class do? there is no clear javadoc in my googling... It's hard to help you not knowing your class, if you paste everything omitting just sensitive information maybe I could...
    – lauksas
    Nov 14 at 12:06










  • FYI.. I am using Oauth library for java called signpost. import oauth.signpost.OAuthConsumer; import oauth.signpost.commonshttp.CommonsHttpOAuthConsumer; --> This is used for signing HTTP requests from signpost library.
    – Manudatta G
    Nov 16 at 10:14
















0














I am getting 401 Unauthorized error when i use Http GET call with OAuthConsumer client.



I have all the required parameters for Oauth 1.0 authorization.



Consumer Key = "XXX"
Consumer Secret = "YYY"
oauth_signature_method = "HMAC-SHA1"
oauth_timestamp = "calculated timestamp"
oauth_nonce = "calculated nonce"
oauth_version = 1.0
oauth_signature = "calculated signature"


The same Ouath 1.0 code in python is working well for me just by using consumer key, secret and signature_type='auth_header' and by calling requests.get(). Here's my python code below :



import requests
from requests_oauthlib import OAuth1

url = "XXX"
header_auth = OAuth1('consumer_key','consumer_secret', signature_type='auth_header')
response = requests.get(url, auth=header_auth)
print(response.status_code)
print(response.content)


Here is my code snippet in Java. Could you please suggest where I am going wrong?



public class OauthConsumerClient



@SuppressWarnings("deprecation")
public static void main(String args)

String url = "XXX";

DefaultHttpClient httpClient = new DefaultHttpClient();
httpClient.getParams().setParameter("http.protocol.content-charset", "UTF-8");
HttpRequestBase httpRequest = null;
URI uri = null;
HttpResponse httpResponse = null;
OAuthConsumer oAuthConsumer = new CommonsHttpOAuthConsumer("consumer_key", "consumer_secret");
oAuthConsumer.setSigningStrategy(new AuthorizationHeaderSigningStrategy());

try
uri = new URI(url);
httpRequest = new HttpGet(uri);
httpRequest.setHeader("Content-Type", "application/json");
oAuthConsumer.sign(httpRequest);
HttpHost target = new HttpHost(uri.getHost(), -1, uri.getScheme());
httpResponse = httpClient.execute(target, httpRequest);
System.out.println("Connection status : " + httpResponse.getStatusLine());
System.out.println("Connection status code : " + httpResponse.getStatusLine().getStatusCode());

catch (Exception e)
System.out.println("Exception occured");

InputStream inputStraem = httpResponse.getEntity().getContent();
StringWriter writer = new StringWriter();
IOUtils.copy(inputStraem, writer, "UTF-8");
String output = writer.toString();
System.out.println("Connection response : " + output);





Output 
-------------------------------------------------------------------------

16:13:43.064 [main] DEBUG o.a.h.impl.client.DefaultHttpClient - Authentication required
16:13:43.064 [main] DEBUG o.a.h.impl.client.DefaultHttpClient - "URL" requested authentication
16:13:43.064 [main] DEBUG o.a.h.i.c.TargetAuthenticationStrategy - Authentication schemes in the order of preference: [Negotiate, Kerberos, NTLM, Digest, Basic]
16:13:43.064 [main] DEBUG o.a.h.i.c.TargetAuthenticationStrategy - Challenge for Negotiate authentication scheme not available
16:13:43.064 [main] DEBUG o.a.h.i.c.TargetAuthenticationStrategy - Challenge for Kerberos authentication scheme not available
16:13:43.064 [main] DEBUG o.a.h.i.c.TargetAuthenticationStrategy - Challenge for NTLM authentication scheme not available
16:13:43.064 [main] DEBUG o.a.h.i.c.TargetAuthenticationStrategy - Challenge for Digest authentication scheme not available
16:13:43.064 [main] DEBUG o.a.h.i.c.TargetAuthenticationStrategy - Challenge for Basic authentication scheme not available
Connection status : HTTP/1.1 401 Unauthorized
Connection status code : 401
16:13:43.076 [main] DEBUG org.apache.http.wire - << " ["The request must be signed"]"
16:13:43.076 [main] DEBUG o.a.h.i.c.BasicClientConnectionManager - Releasing connection org.apache.http.impl.conn.ManagedClientConnectionImpl@78691363
16:13:43.076 [main] DEBUG o.a.h.i.c.BasicClientConnectionManager - Connection can be kept alive indefinitely
Connection response : ["The request must be signed"]


NOTE : When i hit the same URL in postman with Oauth 1.0 authorization type. I am getting response code 200 OK with the body.



Let me know if you need additional information. Thank you so much for your help !!!










share|improve this question























  • Not enough information to answer correctly, but seems that you are not getting the authentication header as you should. You first need to hit the oAuth URL, get you header then include it in the actual request. OAuth is different than Basic authentication, you need to authenticate prior to the request and carry the authentication token as long as it is valid. Quick video explaining the basics: youtube.com/watch?v=CPbvxxslDTU
    – lauksas
    Nov 12 at 12:51











  • I have edited my question with some more information. Please let me know if you need more info.
    – Manudatta G
    Nov 13 at 7:03










  • You are omitting imports, OAuthConsumer which seems to be an interface, doesn't tell me much. Maybe you are using RESTEasy? What does CommonsHttpOAuthConsumer class do? there is no clear javadoc in my googling... It's hard to help you not knowing your class, if you paste everything omitting just sensitive information maybe I could...
    – lauksas
    Nov 14 at 12:06










  • FYI.. I am using Oauth library for java called signpost. import oauth.signpost.OAuthConsumer; import oauth.signpost.commonshttp.CommonsHttpOAuthConsumer; --> This is used for signing HTTP requests from signpost library.
    – Manudatta G
    Nov 16 at 10:14














0












0








0







I am getting 401 Unauthorized error when i use Http GET call with OAuthConsumer client.



I have all the required parameters for Oauth 1.0 authorization.



Consumer Key = "XXX"
Consumer Secret = "YYY"
oauth_signature_method = "HMAC-SHA1"
oauth_timestamp = "calculated timestamp"
oauth_nonce = "calculated nonce"
oauth_version = 1.0
oauth_signature = "calculated signature"


The same Ouath 1.0 code in python is working well for me just by using consumer key, secret and signature_type='auth_header' and by calling requests.get(). Here's my python code below :



import requests
from requests_oauthlib import OAuth1

url = "XXX"
header_auth = OAuth1('consumer_key','consumer_secret', signature_type='auth_header')
response = requests.get(url, auth=header_auth)
print(response.status_code)
print(response.content)


Here is my code snippet in Java. Could you please suggest where I am going wrong?



public class OauthConsumerClient



@SuppressWarnings("deprecation")
public static void main(String args)

String url = "XXX";

DefaultHttpClient httpClient = new DefaultHttpClient();
httpClient.getParams().setParameter("http.protocol.content-charset", "UTF-8");
HttpRequestBase httpRequest = null;
URI uri = null;
HttpResponse httpResponse = null;
OAuthConsumer oAuthConsumer = new CommonsHttpOAuthConsumer("consumer_key", "consumer_secret");
oAuthConsumer.setSigningStrategy(new AuthorizationHeaderSigningStrategy());

try
uri = new URI(url);
httpRequest = new HttpGet(uri);
httpRequest.setHeader("Content-Type", "application/json");
oAuthConsumer.sign(httpRequest);
HttpHost target = new HttpHost(uri.getHost(), -1, uri.getScheme());
httpResponse = httpClient.execute(target, httpRequest);
System.out.println("Connection status : " + httpResponse.getStatusLine());
System.out.println("Connection status code : " + httpResponse.getStatusLine().getStatusCode());

catch (Exception e)
System.out.println("Exception occured");

InputStream inputStraem = httpResponse.getEntity().getContent();
StringWriter writer = new StringWriter();
IOUtils.copy(inputStraem, writer, "UTF-8");
String output = writer.toString();
System.out.println("Connection response : " + output);





Output 
-------------------------------------------------------------------------

16:13:43.064 [main] DEBUG o.a.h.impl.client.DefaultHttpClient - Authentication required
16:13:43.064 [main] DEBUG o.a.h.impl.client.DefaultHttpClient - "URL" requested authentication
16:13:43.064 [main] DEBUG o.a.h.i.c.TargetAuthenticationStrategy - Authentication schemes in the order of preference: [Negotiate, Kerberos, NTLM, Digest, Basic]
16:13:43.064 [main] DEBUG o.a.h.i.c.TargetAuthenticationStrategy - Challenge for Negotiate authentication scheme not available
16:13:43.064 [main] DEBUG o.a.h.i.c.TargetAuthenticationStrategy - Challenge for Kerberos authentication scheme not available
16:13:43.064 [main] DEBUG o.a.h.i.c.TargetAuthenticationStrategy - Challenge for NTLM authentication scheme not available
16:13:43.064 [main] DEBUG o.a.h.i.c.TargetAuthenticationStrategy - Challenge for Digest authentication scheme not available
16:13:43.064 [main] DEBUG o.a.h.i.c.TargetAuthenticationStrategy - Challenge for Basic authentication scheme not available
Connection status : HTTP/1.1 401 Unauthorized
Connection status code : 401
16:13:43.076 [main] DEBUG org.apache.http.wire - << " ["The request must be signed"]"
16:13:43.076 [main] DEBUG o.a.h.i.c.BasicClientConnectionManager - Releasing connection org.apache.http.impl.conn.ManagedClientConnectionImpl@78691363
16:13:43.076 [main] DEBUG o.a.h.i.c.BasicClientConnectionManager - Connection can be kept alive indefinitely
Connection response : ["The request must be signed"]


NOTE : When i hit the same URL in postman with Oauth 1.0 authorization type. I am getting response code 200 OK with the body.



Let me know if you need additional information. Thank you so much for your help !!!










share|improve this question















I am getting 401 Unauthorized error when i use Http GET call with OAuthConsumer client.



I have all the required parameters for Oauth 1.0 authorization.



Consumer Key = "XXX"
Consumer Secret = "YYY"
oauth_signature_method = "HMAC-SHA1"
oauth_timestamp = "calculated timestamp"
oauth_nonce = "calculated nonce"
oauth_version = 1.0
oauth_signature = "calculated signature"


The same Ouath 1.0 code in python is working well for me just by using consumer key, secret and signature_type='auth_header' and by calling requests.get(). Here's my python code below :



import requests
from requests_oauthlib import OAuth1

url = "XXX"
header_auth = OAuth1('consumer_key','consumer_secret', signature_type='auth_header')
response = requests.get(url, auth=header_auth)
print(response.status_code)
print(response.content)


Here is my code snippet in Java. Could you please suggest where I am going wrong?



public class OauthConsumerClient



@SuppressWarnings("deprecation")
public static void main(String args)

String url = "XXX";

DefaultHttpClient httpClient = new DefaultHttpClient();
httpClient.getParams().setParameter("http.protocol.content-charset", "UTF-8");
HttpRequestBase httpRequest = null;
URI uri = null;
HttpResponse httpResponse = null;
OAuthConsumer oAuthConsumer = new CommonsHttpOAuthConsumer("consumer_key", "consumer_secret");
oAuthConsumer.setSigningStrategy(new AuthorizationHeaderSigningStrategy());

try
uri = new URI(url);
httpRequest = new HttpGet(uri);
httpRequest.setHeader("Content-Type", "application/json");
oAuthConsumer.sign(httpRequest);
HttpHost target = new HttpHost(uri.getHost(), -1, uri.getScheme());
httpResponse = httpClient.execute(target, httpRequest);
System.out.println("Connection status : " + httpResponse.getStatusLine());
System.out.println("Connection status code : " + httpResponse.getStatusLine().getStatusCode());

catch (Exception e)
System.out.println("Exception occured");

InputStream inputStraem = httpResponse.getEntity().getContent();
StringWriter writer = new StringWriter();
IOUtils.copy(inputStraem, writer, "UTF-8");
String output = writer.toString();
System.out.println("Connection response : " + output);





Output 
-------------------------------------------------------------------------

16:13:43.064 [main] DEBUG o.a.h.impl.client.DefaultHttpClient - Authentication required
16:13:43.064 [main] DEBUG o.a.h.impl.client.DefaultHttpClient - "URL" requested authentication
16:13:43.064 [main] DEBUG o.a.h.i.c.TargetAuthenticationStrategy - Authentication schemes in the order of preference: [Negotiate, Kerberos, NTLM, Digest, Basic]
16:13:43.064 [main] DEBUG o.a.h.i.c.TargetAuthenticationStrategy - Challenge for Negotiate authentication scheme not available
16:13:43.064 [main] DEBUG o.a.h.i.c.TargetAuthenticationStrategy - Challenge for Kerberos authentication scheme not available
16:13:43.064 [main] DEBUG o.a.h.i.c.TargetAuthenticationStrategy - Challenge for NTLM authentication scheme not available
16:13:43.064 [main] DEBUG o.a.h.i.c.TargetAuthenticationStrategy - Challenge for Digest authentication scheme not available
16:13:43.064 [main] DEBUG o.a.h.i.c.TargetAuthenticationStrategy - Challenge for Basic authentication scheme not available
Connection status : HTTP/1.1 401 Unauthorized
Connection status code : 401
16:13:43.076 [main] DEBUG org.apache.http.wire - << " ["The request must be signed"]"
16:13:43.076 [main] DEBUG o.a.h.i.c.BasicClientConnectionManager - Releasing connection org.apache.http.impl.conn.ManagedClientConnectionImpl@78691363
16:13:43.076 [main] DEBUG o.a.h.i.c.BasicClientConnectionManager - Connection can be kept alive indefinitely
Connection response : ["The request must be signed"]


NOTE : When i hit the same URL in postman with Oauth 1.0 authorization type. I am getting response code 200 OK with the body.



Let me know if you need additional information. Thank you so much for your help !!!







java httprequest httpclient oauth-1.0a






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 13 at 7:02

























asked Nov 12 at 11:13









Manudatta G

14




14











  • Not enough information to answer correctly, but seems that you are not getting the authentication header as you should. You first need to hit the oAuth URL, get you header then include it in the actual request. OAuth is different than Basic authentication, you need to authenticate prior to the request and carry the authentication token as long as it is valid. Quick video explaining the basics: youtube.com/watch?v=CPbvxxslDTU
    – lauksas
    Nov 12 at 12:51











  • I have edited my question with some more information. Please let me know if you need more info.
    – Manudatta G
    Nov 13 at 7:03










  • You are omitting imports, OAuthConsumer which seems to be an interface, doesn't tell me much. Maybe you are using RESTEasy? What does CommonsHttpOAuthConsumer class do? there is no clear javadoc in my googling... It's hard to help you not knowing your class, if you paste everything omitting just sensitive information maybe I could...
    – lauksas
    Nov 14 at 12:06










  • FYI.. I am using Oauth library for java called signpost. import oauth.signpost.OAuthConsumer; import oauth.signpost.commonshttp.CommonsHttpOAuthConsumer; --> This is used for signing HTTP requests from signpost library.
    – Manudatta G
    Nov 16 at 10:14

















  • Not enough information to answer correctly, but seems that you are not getting the authentication header as you should. You first need to hit the oAuth URL, get you header then include it in the actual request. OAuth is different than Basic authentication, you need to authenticate prior to the request and carry the authentication token as long as it is valid. Quick video explaining the basics: youtube.com/watch?v=CPbvxxslDTU
    – lauksas
    Nov 12 at 12:51











  • I have edited my question with some more information. Please let me know if you need more info.
    – Manudatta G
    Nov 13 at 7:03










  • You are omitting imports, OAuthConsumer which seems to be an interface, doesn't tell me much. Maybe you are using RESTEasy? What does CommonsHttpOAuthConsumer class do? there is no clear javadoc in my googling... It's hard to help you not knowing your class, if you paste everything omitting just sensitive information maybe I could...
    – lauksas
    Nov 14 at 12:06










  • FYI.. I am using Oauth library for java called signpost. import oauth.signpost.OAuthConsumer; import oauth.signpost.commonshttp.CommonsHttpOAuthConsumer; --> This is used for signing HTTP requests from signpost library.
    – Manudatta G
    Nov 16 at 10:14
















Not enough information to answer correctly, but seems that you are not getting the authentication header as you should. You first need to hit the oAuth URL, get you header then include it in the actual request. OAuth is different than Basic authentication, you need to authenticate prior to the request and carry the authentication token as long as it is valid. Quick video explaining the basics: youtube.com/watch?v=CPbvxxslDTU
– lauksas
Nov 12 at 12:51





Not enough information to answer correctly, but seems that you are not getting the authentication header as you should. You first need to hit the oAuth URL, get you header then include it in the actual request. OAuth is different than Basic authentication, you need to authenticate prior to the request and carry the authentication token as long as it is valid. Quick video explaining the basics: youtube.com/watch?v=CPbvxxslDTU
– lauksas
Nov 12 at 12:51













I have edited my question with some more information. Please let me know if you need more info.
– Manudatta G
Nov 13 at 7:03




I have edited my question with some more information. Please let me know if you need more info.
– Manudatta G
Nov 13 at 7:03












You are omitting imports, OAuthConsumer which seems to be an interface, doesn't tell me much. Maybe you are using RESTEasy? What does CommonsHttpOAuthConsumer class do? there is no clear javadoc in my googling... It's hard to help you not knowing your class, if you paste everything omitting just sensitive information maybe I could...
– lauksas
Nov 14 at 12:06




You are omitting imports, OAuthConsumer which seems to be an interface, doesn't tell me much. Maybe you are using RESTEasy? What does CommonsHttpOAuthConsumer class do? there is no clear javadoc in my googling... It's hard to help you not knowing your class, if you paste everything omitting just sensitive information maybe I could...
– lauksas
Nov 14 at 12:06












FYI.. I am using Oauth library for java called signpost. import oauth.signpost.OAuthConsumer; import oauth.signpost.commonshttp.CommonsHttpOAuthConsumer; --> This is used for signing HTTP requests from signpost library.
– Manudatta G
Nov 16 at 10:14





FYI.. I am using Oauth library for java called signpost. import oauth.signpost.OAuthConsumer; import oauth.signpost.commonshttp.CommonsHttpOAuthConsumer; --> This is used for signing HTTP requests from signpost library.
– Manudatta G
Nov 16 at 10:14


















active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53260967%2fhttp-1-1-401-unauthorized-error-when-calling-httpget-with-oauthconsumer-client%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53260967%2fhttp-1-1-401-unauthorized-error-when-calling-httpget-with-oauthconsumer-client%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







這個網誌中的熱門文章

How to read a connectionString WITH PROVIDER in .NET Core?

Node.js Script on GitHub Pages or Amazon S3

Museum of Modern and Contemporary Art of Trento and Rovereto