[twitter-dev] Re: The remote server returned an error: (401) Unauthorized.
I've changed my IP address. I have tried switching from TwitterVB to Twiterizer. I've triple checked the credentials. And I'm getting the same 401 error ONLY on my host (m6.net). Does anyone have a suggestion? On Apr 25, 7:42 am, The World Connection nathan.poeppel...@gmail.com wrote: It's weird. It worked on my old host and it works fine on my developer PC. I did change the IP of the website and that did not help. I'm having my current host (M6.net) investigate, but currently I am stumped. The following is the error description Thanks! The remote server returned an error: (401) Unauthorized. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Net.WebException: The remote server returned an error: (401) Unauthorized. Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace: [WebException: The remote server returned an error: (401) Unauthorized.] System.Net.HttpWebRequest.GetResponse() +5375213 TwitterVB2.TwitterOAuth.WebRequest(Method RequestMethod, String Url, String PostData) +351 [TwitterAPIException: Exception of type 'TwitterAPIException' was thrown.] TwitterVB2.TwitterOAuth.WebRequest(Method RequestMethod, String Url, String PostData) +832 TwitterVB2.TwitterOAuth.OAuthWebRequest(Method RequestMethod, String url, String PostData) +563 TwitterVB2.TwitterOAuth.GetAuthenticationLink() +33 TwitterVB2.TwitterAPI.GetAuthenticationLink(String ConsumerKey, String ConsumerKeySecret, String CallbackUrl) +56 Research_Twitter.Button1_Click(Object sender, EventArgs e) +297 System.Web.UI.WebControls.Button.OnClick(EventArgs e) +111 System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +110 System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaiseP ostBackEvent(String eventArgument) +10 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565 On Apr 19, 12:09 pm, Matt Harris mhar...@twitter.com wrote: HiNathan, So we can help diagnose the problem could you inspect the response body that comes back from your request to the API. It contains an explanation of why the401is being returned and let's us know how to proceed. Best @themattharris On Apr 19, 2011, at 11:17, The World Connection nathan.poeppel...@gmail.com wrote: I'm using TwitterVB and for some reason in the last week I've been receiving the following error. The remote server returned an error: (401) Unauthorized. I'm using the following code structure. http://twittervb.codeplex.com/wikipage?title=OAuth%20Web%20Tutorial Nothing changed. I've tried to reset my customer key/secret, that didn't work. I've tried to recreate the app, that didn't work. Do I have to wait for a propagation time period? Does Twitter restrict IP addresses? My website is sitting on a host. Any ideas? Thanks! Nathan -- Twitter developer documentation and resources:http://dev.twitter.com/doc API updates via Twitter:http://twitter.com/twitterapi Issues/Enhancements Tracker:http://code.google.com/p/twitter-api/issues/list Change your membership to this group:http://groups.google.com/group/twitter-development-talk -- Twitter developer documentation and resources: http://dev.twitter.com/doc API updates via Twitter: http://twitter.com/twitterapi Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list Change your membership to this group: http://groups.google.com/group/twitter-development-talk
[twitter-dev] Re: The remote server returned an error: (401) Unauthorized.
I think I figured it out. The Host time was off by an hour. Throwing off the UTC Time stamp. With Twitter giving you a 5 minute range. It responded as unauthorized. On Apr 26, 9:02 am, The World Connection nathan.poeppel...@gmail.com wrote: I've changed my IP address. I have tried switching from TwitterVB to Twiterizer. I've triple checked the credentials. And I'm getting the same401error ONLY on my host (m6.net). Does anyone have a suggestion? On Apr 25, 7:42 am, The World Connection nathan.poeppel...@gmail.com wrote: It's weird. It worked on my old host and it works fine on my developer PC. I did change the IP of the website and that did not help. I'm having my current host (M6.net) investigate, but currently I am stumped. The following is the error description Thanks! The remote server returned an error: (401) Unauthorized. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Net.WebException: The remote server returned an error: (401) Unauthorized. Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace: [WebException: The remote server returned an error: (401) Unauthorized.] System.Net.HttpWebRequest.GetResponse() +5375213 TwitterVB2.TwitterOAuth.WebRequest(Method RequestMethod, String Url, String PostData) +351 [TwitterAPIException: Exception of type 'TwitterAPIException' was thrown.] TwitterVB2.TwitterOAuth.WebRequest(Method RequestMethod, String Url, String PostData) +832 TwitterVB2.TwitterOAuth.OAuthWebRequest(Method RequestMethod, String url, String PostData) +563 TwitterVB2.TwitterOAuth.GetAuthenticationLink() +33 TwitterVB2.TwitterAPI.GetAuthenticationLink(String ConsumerKey, String ConsumerKeySecret, String CallbackUrl) +56 Research_Twitter.Button1_Click(Object sender, EventArgs e) +297 System.Web.UI.WebControls.Button.OnClick(EventArgs e) +111 System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +110 System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaiseP ostBackEvent(String eventArgument) +10 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565 On Apr 19, 12:09 pm, Matt Harris mhar...@twitter.com wrote: HiNathan, So we can help diagnose the problem could you inspect the response body that comes back from your request to the API. It contains an explanation of why the401is being returned and let's us know how to proceed. Best @themattharris On Apr 19, 2011, at 11:17, The World Connection nathan.poeppel...@gmail.com wrote: I'm using TwitterVB and for some reason in the last week I've been receiving the following error. The remote server returned an error: (401) Unauthorized. I'm using the following code structure. http://twittervb.codeplex.com/wikipage?title=OAuth%20Web%20Tutorial Nothing changed. I've tried to reset my customer key/secret, that didn't work. I've tried to recreate the app, that didn't work. Do I have to wait for a propagation time period? Does Twitter restrict IP addresses? My website is sitting on a host. Any ideas? Thanks! Nathan -- Twitter developer documentation and resources:http://dev.twitter.com/doc API updates via Twitter:http://twitter.com/twitterapi Issues/Enhancements Tracker:http://code.google.com/p/twitter-api/issues/list Change your membership to this group:http://groups.google.com/group/twitter-development-talk -- Twitter developer documentation and resources: http://dev.twitter.com/doc API updates via Twitter: http://twitter.com/twitterapi Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list Change your membership to this group: http://groups.google.com/group/twitter-development-talk
[twitter-dev] Re: The remote server returned an error: (401) Unauthorized.
It's weird. It worked on my old host and it works fine on my developer PC. I did change the IP of the website and that did not help. I'm having my current host (M6.net) investigate, but currently I am stumped. The following is the error description Thanks! The remote server returned an error: (401) Unauthorized. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Net.WebException: The remote server returned an error: (401) Unauthorized. Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace: [WebException: The remote server returned an error: (401) Unauthorized.] System.Net.HttpWebRequest.GetResponse() +5375213 TwitterVB2.TwitterOAuth.WebRequest(Method RequestMethod, String Url, String PostData) +351 [TwitterAPIException: Exception of type 'TwitterAPIException' was thrown.] TwitterVB2.TwitterOAuth.WebRequest(Method RequestMethod, String Url, String PostData) +832 TwitterVB2.TwitterOAuth.OAuthWebRequest(Method RequestMethod, String url, String PostData) +563 TwitterVB2.TwitterOAuth.GetAuthenticationLink() +33 TwitterVB2.TwitterAPI.GetAuthenticationLink(String ConsumerKey, String ConsumerKeySecret, String CallbackUrl) +56 Research_Twitter.Button1_Click(Object sender, EventArgs e) +297 System.Web.UI.WebControls.Button.OnClick(EventArgs e) +111 System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +110 System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565 On Apr 19, 12:09 pm, Matt Harris mhar...@twitter.com wrote: HiNathan, So we can help diagnose the problem could you inspect the response body that comes back from your request to the API. It contains an explanation of why the 401 is being returned and let's us know how to proceed. Best @themattharris On Apr 19, 2011, at 11:17, The World Connection nathan.poeppel...@gmail.com wrote: I'm using TwitterVB and for some reason in the last week I've been receiving the following error. The remote server returned an error: (401) Unauthorized. I'm using the following code structure. http://twittervb.codeplex.com/wikipage?title=OAuth%20Web%20Tutorial Nothing changed. I've tried to reset my customer key/secret, that didn't work. I've tried to recreate the app, that didn't work. Do I have to wait for a propagation time period? Does Twitter restrict IP addresses? My website is sitting on a host. Any ideas? Thanks! Nathan -- Twitter developer documentation and resources:http://dev.twitter.com/doc API updates via Twitter:http://twitter.com/twitterapi Issues/Enhancements Tracker:http://code.google.com/p/twitter-api/issues/list Change your membership to this group:http://groups.google.com/group/twitter-development-talk -- Twitter developer documentation and resources: http://dev.twitter.com/doc API updates via Twitter: http://twitter.com/twitterapi Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list Change your membership to this group: http://groups.google.com/group/twitter-development-talk
[twitter-dev] Re: The remote server returned an error: (401) Unauthorized. + asp.net
Is there any solution?? Can somebody help me on this issue? On Oct 9, 3:13 pm, Mansi mansi.s...@etatvasoft.com wrote: Does anybody has idea for this issue? On Oct 7, 4:30 pm, Mansi mansi.s...@etatvasoft.com wrote: I have to post text on Twitter through my web site. For that I've created one application on Twitter. And have done all the related changes in site source code. I am using .net Framework 2.0. But having issue while redirecting to Twitter (oAuth.AuthorizationLinkGet()). It throws bug The remote server returned an error: (401) Unauthorized in below code. (oAuthTwitter.cs file) public string WebResponseGet(HttpWebRequest webRequest) { StreamReader responseReader = null; string responseData = ; try { responseReader = new StreamReader(webRequest.GetResponse().GetResponseStream()); //HERE IT THROWS EXCEPTION. responseData = responseReader.ReadToEnd(); } catch { throw; } finally { webRequest.GetResponse().GetResponseStream().Close(); responseReader.Close(); responseReader = null; } return responseData; } What causes this bug? And what is the solution? -- Twitter developer documentation and resources: http://dev.twitter.com/doc API updates via Twitter: http://twitter.com/twitterapi Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list Change your membership to this group: http://groups.google.com/group/twitter-development-talk
[twitter-dev] Re: The remote server returned an error: (401) Unauthorized. + asp.net
Does anybody has idea for this issue? On Oct 7, 4:30 pm, Mansi mansi.s...@etatvasoft.com wrote: I have to post text on Twitter through my web site. For that I've created one application on Twitter. And have done all the related changes in site source code. I am using .net Framework 2.0. But having issue while redirecting to Twitter (oAuth.AuthorizationLinkGet()). It throws bug The remote server returned an error: (401) Unauthorized in below code. (oAuthTwitter.cs file) public string WebResponseGet(HttpWebRequest webRequest) { StreamReader responseReader = null; string responseData = ; try { responseReader = new StreamReader(webRequest.GetResponse().GetResponseStream()); //HERE IT THROWS EXCEPTION. responseData = responseReader.ReadToEnd(); } catch { throw; } finally { webRequest.GetResponse().GetResponseStream().Close(); responseReader.Close(); responseReader = null; } return responseData; } What causes this bug? And what is the solution? -- Twitter developer documentation and resources: http://dev.twitter.com/doc API updates via Twitter: http://twitter.com/twitterapi Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list Change your membership to this group: http://groups.google.com/group/twitter-development-talk
Re: [twitter-dev] Re: The remote server returned an error: (401) Unauthorized
Twitter doesn't really care about IPs - unless you are doing things really, really, really wrong. Assuming that the signature generation stays the same (some platforms have little-endian BO, big-endian BO, etc, and that may change the algorithm a bit, but when windows-windows that doesn't really apply), the most likely cause of this error is the timestamp of the computer running the application. Tom On 8/10/10 12:07 PM, punit khaire wrote: Hey Taylor Thanks,for reply, My problem redirect is solved.Now the problem is , I developed website for twitter OAuth using .net 2.0,I deployed that application in public IP, and suddenly I got following error, /An existing connection was forcibly closed by the remote host./ But when I run the same application from localhost on same IP,It is working fine.And gives error when It redirected to my Public IP Call back URl. I couldnt figure out is it website issue or Public IP issue. Thanks for help in advance, Punit On Mon, Aug 9, 2010 at 7:45 PM, Taylor Singletary taylorsinglet...@twitter.com mailto:taylorsinglet...@twitter.com wrote: Hi Punit, First, some advice: I recommend using HTTP header-based OAuth rather than putting your OAuth parameters directly in the query string. It separates concerns and makes your debugging ultimately easier. That said, the first issue you're probably running into is that you aren't URL-encoding your OAuth Callback properly. In fact, when you're presenting any of these OAuth parameters, whether it was via HTTP header or query string, you need to do some more escaping. For our servers to properly interpret the URL you are sending, your request would need to look a bit more like (noting that the signature would be significantly different as a result): http://api.twitter.com/oauth/request_token?oauth_callback=http%3A%2F%2F203.78.217.115%2FIssueManager%2FLogin.aspoauth_consumer_key=ilmsYrfa0XjtsqJXCB6HcQoauth_nonce=821b87d0-2022-4f50-adcd-76ddae52c5dboauth_signature=Q01ZADdBJNh5dbltMMQXP37EkVg%3Doauth_signature_method=HMAC-SHA1oauth_timestamp=1281177991oauth_version=1.0 http://api.twitter.com/oauth/request_token?oauth_callback=http%3A%2F%2F203.78.217.115%2FIssueManager%2FLogin.aspoauth_consumer_key=ilmsYrfa0XjtsqJXCB6HcQoauth_nonce=821b87d0-2022-4f50-adcd-76ddae52c5dboauth_signature=Q01ZADdBJNh5dbltMMQXP37EkVg%3Doauth_signature_method=HMAC-SHA1oauth_timestamp=1281177991oauth_version=1.0 Are you using an OAuth library for this? Taylor On Sat, Aug 7, 2010 at 5:32 PM, execut...@gmail.com execut...@gmail.com mailto:execut...@gmail.com wrote: the link below is broken,, On Sat, Aug 7, 2010 at 4:44 PM, Tom allerleiga...@gmail.com mailto:allerleiga...@gmail.com wrote: How are you generating the signature? Tom On Aug 7, 2:43 pm, Punit.khaire punit.kha...@gmail.com mailto:punit.kha...@gmail.com wrote: Hi guys, I started to work on the twitter application .Our main task is to tweet messages using oAuth authentication. I am sending below request using GET method, http://api.twitter.com/oauth/request_token?oauth_callback=http://203 When I manually hit the above URl I get following error message, Failed to validate oauth signature and token I dont understand y I get this message,as I am sending everything in my parameter list. Am I missing something here,thanks in advance for any help. -- -- Michael J.D Saguri 1-250-999-0890 http://www.tweep.net http://www.tweep.net/ Skype: marketingmaniac
Re: [twitter-dev] Re: The remote server returned an error: (401) Unauthorized
Hi, Thanks, for the reply, But then why site working from the localhost on the same Computer.But If I accessed it from Public IP it returns error. Thanks, Punit Khaire. On Tue, Aug 10, 2010 at 4:13 PM, Tom van der Woerdt i...@tvdw.eu wrote: Twitter doesn't really care about IPs - unless you are doing things really, really, really wrong. Assuming that the signature generation stays the same (some platforms have little-endian BO, big-endian BO, etc, and that may change the algorithm a bit, but when windows-windows that doesn't really apply), the most likely cause of this error is the timestamp of the computer running the application. Tom On 8/10/10 12:07 PM, punit khaire wrote: Hey Taylor Thanks,for reply, My problem redirect is solved.Now the problem is , I developed website for twitter OAuth using .net 2.0,I deployed that application in public IP, and suddenly I got following error, /An existing connection was forcibly closed by the remote host./ But when I run the same application from localhost on same IP,It is working fine.And gives error when It redirected to my Public IP Call back URl. I couldnt figure out is it website issue or Public IP issue. Thanks for help in advance, Punit On Mon, Aug 9, 2010 at 7:45 PM, Taylor Singletary taylorsinglet...@twitter.com mailto:taylorsinglet...@twitter.com wrote: Hi Punit, First, some advice: I recommend using HTTP header-based OAuth rather than putting your OAuth parameters directly in the query string. It separates concerns and makes your debugging ultimately easier. That said, the first issue you're probably running into is that you aren't URL-encoding your OAuth Callback properly. In fact, when you're presenting any of these OAuth parameters, whether it was via HTTP header or query string, you need to do some more escaping. For our servers to properly interpret the URL you are sending, your request would need to look a bit more like (noting that the signature would be significantly different as a result): http://api.twitter.com/oauth/request_token?oauth_callback=http%3A%2F%2F203.78.217.115%2FIssueManager%2FLogin.aspoauth_consumer_key=ilmsYrfa0XjtsqJXCB6HcQoauth_nonce=821b87d0-2022-4f50-adcd-76ddae52c5dboauth_signature=Q01ZADdBJNh5dbltMMQXP37EkVg%3Doauth_signature_method=HMAC-SHA1oauth_timestamp=1281177991oauth_version=1.0 http://api.twitter.com/oauth/request_token?oauth_callback=http%3A%2F%2F203.78.217.115%2FIssueManager%2FLogin.aspoauth_consumer_key=ilmsYrfa0XjtsqJXCB6HcQoauth_nonce=821b87d0-2022-4f50-adcd-76ddae52c5dboauth_signature=Q01ZADdBJNh5dbltMMQXP37EkVg%3Doauth_signature_method=HMAC-SHA1oauth_timestamp=1281177991oauth_version=1.0 Are you using an OAuth library for this? Taylor On Sat, Aug 7, 2010 at 5:32 PM, execut...@gmail.com execut...@gmail.com mailto:execut...@gmail.com wrote: the link below is broken,, On Sat, Aug 7, 2010 at 4:44 PM, Tom allerleiga...@gmail.com mailto:allerleiga...@gmail.com wrote: How are you generating the signature? Tom On Aug 7, 2:43 pm, Punit.khaire punit.kha...@gmail.com mailto:punit.kha...@gmail.com wrote: Hi guys, I started to work on the twitter application .Our main task is to tweet messages using oAuth authentication. I am sending below request using GET method, http://api.twitter.com/oauth/request_token?oauth_callback=http://203 When I manually hit the above URl I get following error message, Failed to validate oauth signature and token I dont understand y I get this message,as I am sending everything in my parameter list. Am I missing something here,thanks in advance for any help. -- -- Michael J.D Saguri 1-250-999-0890 http://www.tweep.net http://www.tweep.net/ Skype: marketingmaniac
Re: [twitter-dev] Re: The remote server returned an error: (401) Unauthorized
Oh, it's the same computer? In that case, my timestamp issue doesn't apply. You should check that all localhost URLs have been removed and changed to the public addresses. That's all I can think of - like I already said, OAuth (and Twitter) doesn't really care about IP addresses. Tom On 8/10/10 1:11 PM, punit khaire wrote: Hi, Thanks, for the reply, But then why site working from the localhost on the same Computer.But If I accessed it from Public IP it returns error. Thanks, Punit Khaire. On Tue, Aug 10, 2010 at 4:13 PM, Tom van der Woerdt i...@tvdw.eu mailto:i...@tvdw.eu wrote: Twitter doesn't really care about IPs - unless you are doing things really, really, really wrong. Assuming that the signature generation stays the same (some platforms have little-endian BO, big-endian BO, etc, and that may change the algorithm a bit, but when windows-windows that doesn't really apply), the most likely cause of this error is the timestamp of the computer running the application. Tom On 8/10/10 12:07 PM, punit khaire wrote: Hey Taylor Thanks,for reply, My problem redirect is solved.Now the problem is , I developed website for twitter OAuth using .net 2.0,I deployed that application in public IP, and suddenly I got following error, /An existing connection was forcibly closed by the remote host./ But when I run the same application from localhost on same IP,It is working fine.And gives error when It redirected to my Public IP Call back URl. I couldnt figure out is it website issue or Public IP issue. Thanks for help in advance, Punit On Mon, Aug 9, 2010 at 7:45 PM, Taylor Singletary taylorsinglet...@twitter.com mailto:taylorsinglet...@twitter.com mailto:taylorsinglet...@twitter.com mailto:taylorsinglet...@twitter.com wrote: Hi Punit, First, some advice: I recommend using HTTP header-based OAuth rather than putting your OAuth parameters directly in the query string. It separates concerns and makes your debugging ultimately easier. That said, the first issue you're probably running into is that you aren't URL-encoding your OAuth Callback properly. In fact, when you're presenting any of these OAuth parameters, whether it was via HTTP header or query string, you need to do some more escaping. For our servers to properly interpret the URL you are sending, your request would need to look a bit more like (noting that the signature would be significantly different as a result): http://api.twitter.com/oauth/request_token?oauth_callback=http%3A%2F%2F203.78.217.115%2FIssueManager%2FLogin.aspoauth_consumer_key=ilmsYrfa0XjtsqJXCB6HcQoauth_nonce=821b87d0-2022-4f50-adcd-76ddae52c5dboauth_signature=Q01ZADdBJNh5dbltMMQXP37EkVg%3Doauth_signature_method=HMAC-SHA1oauth_timestamp=1281177991oauth_version=1.0 http://api.twitter.com/oauth/request_token?oauth_callback=http%3A%2F%2F203.78.217.115%2FIssueManager%2FLogin.aspoauth_consumer_key=ilmsYrfa0XjtsqJXCB6HcQoauth_nonce=821b87d0-2022-4f50-adcd-76ddae52c5dboauth_signature=Q01ZADdBJNh5dbltMMQXP37EkVg%3Doauth_signature_method=HMAC-SHA1oauth_timestamp=1281177991oauth_version=1.0 http://api.twitter.com/oauth/request_token?oauth_callback=http%3A%2F%2F203.78.217.115%2FIssueManager%2FLogin.aspoauth_consumer_key=ilmsYrfa0XjtsqJXCB6HcQoauth_nonce=821b87d0-2022-4f50-adcd-76ddae52c5dboauth_signature=Q01ZADdBJNh5dbltMMQXP37EkVg%3Doauth_signature_method=HMAC-SHA1oauth_timestamp=1281177991oauth_version=1.0 http://api.twitter.com/oauth/request_token?oauth_callback=http%3A%2F%2F203.78.217.115%2FIssueManager%2FLogin.aspoauth_consumer_key=ilmsYrfa0XjtsqJXCB6HcQoauth_nonce=821b87d0-2022-4f50-adcd-76ddae52c5dboauth_signature=Q01ZADdBJNh5dbltMMQXP37EkVg%3Doauth_signature_method=HMAC-SHA1oauth_timestamp=1281177991oauth_version=1.0 Are you using an OAuth library for this? Taylor On Sat, Aug 7, 2010 at 5:32 PM, execut...@gmail.com execut...@gmail.com mailto:execut...@gmail.com mailto:execut...@gmail.com mailto:execut...@gmail.com wrote: the link below is broken,, On Sat, Aug 7, 2010 at 4:44 PM, Tom allerleiga...@gmail.com mailto:allerleiga...@gmail.com mailto:allerleiga...@gmail.com mailto:allerleiga...@gmail.com wrote: How are you generating the signature? Tom On Aug 7, 2:43 pm, Punit.khaire punit.kha...@gmail.com mailto:punit.kha...@gmail.com mailto:punit.kha...@gmail.com mailto:punit.kha...@gmail.com wrote:
Re: [twitter-dev] Re: The remote server returned an error: (401) Unauthorized
Sorry for the double post, but I just realized: is your public IP firewalled? That could possibly be the issue. Also, is the error you are getting a Firefox (or any browser) error, or an OAuth/Twitter error? Tom On 8/10/10 1:11 PM, punit khaire wrote: Hi, Thanks, for the reply, But then why site working from the localhost on the same Computer.But If I accessed it from Public IP it returns error. Thanks, Punit Khaire. On Tue, Aug 10, 2010 at 4:13 PM, Tom van der Woerdt i...@tvdw.eu mailto:i...@tvdw.eu wrote: Twitter doesn't really care about IPs - unless you are doing things really, really, really wrong. Assuming that the signature generation stays the same (some platforms have little-endian BO, big-endian BO, etc, and that may change the algorithm a bit, but when windows-windows that doesn't really apply), the most likely cause of this error is the timestamp of the computer running the application. Tom On 8/10/10 12:07 PM, punit khaire wrote: Hey Taylor Thanks,for reply, My problem redirect is solved.Now the problem is , I developed website for twitter OAuth using .net 2.0,I deployed that application in public IP, and suddenly I got following error, /An existing connection was forcibly closed by the remote host./ But when I run the same application from localhost on same IP,It is working fine.And gives error when It redirected to my Public IP Call back URl. I couldnt figure out is it website issue or Public IP issue. Thanks for help in advance, Punit On Mon, Aug 9, 2010 at 7:45 PM, Taylor Singletary taylorsinglet...@twitter.com mailto:taylorsinglet...@twitter.com mailto:taylorsinglet...@twitter.com mailto:taylorsinglet...@twitter.com wrote: Hi Punit, First, some advice: I recommend using HTTP header-based OAuth rather than putting your OAuth parameters directly in the query string. It separates concerns and makes your debugging ultimately easier. That said, the first issue you're probably running into is that you aren't URL-encoding your OAuth Callback properly. In fact, when you're presenting any of these OAuth parameters, whether it was via HTTP header or query string, you need to do some more escaping. For our servers to properly interpret the URL you are sending, your request would need to look a bit more like (noting that the signature would be significantly different as a result): http://api.twitter.com/oauth/request_token?oauth_callback=http%3A%2F%2F203.78.217.115%2FIssueManager%2FLogin.aspoauth_consumer_key=ilmsYrfa0XjtsqJXCB6HcQoauth_nonce=821b87d0-2022-4f50-adcd-76ddae52c5dboauth_signature=Q01ZADdBJNh5dbltMMQXP37EkVg%3Doauth_signature_method=HMAC-SHA1oauth_timestamp=1281177991oauth_version=1.0 http://api.twitter.com/oauth/request_token?oauth_callback=http%3A%2F%2F203.78.217.115%2FIssueManager%2FLogin.aspoauth_consumer_key=ilmsYrfa0XjtsqJXCB6HcQoauth_nonce=821b87d0-2022-4f50-adcd-76ddae52c5dboauth_signature=Q01ZADdBJNh5dbltMMQXP37EkVg%3Doauth_signature_method=HMAC-SHA1oauth_timestamp=1281177991oauth_version=1.0 http://api.twitter.com/oauth/request_token?oauth_callback=http%3A%2F%2F203.78.217.115%2FIssueManager%2FLogin.aspoauth_consumer_key=ilmsYrfa0XjtsqJXCB6HcQoauth_nonce=821b87d0-2022-4f50-adcd-76ddae52c5dboauth_signature=Q01ZADdBJNh5dbltMMQXP37EkVg%3Doauth_signature_method=HMAC-SHA1oauth_timestamp=1281177991oauth_version=1.0 http://api.twitter.com/oauth/request_token?oauth_callback=http%3A%2F%2F203.78.217.115%2FIssueManager%2FLogin.aspoauth_consumer_key=ilmsYrfa0XjtsqJXCB6HcQoauth_nonce=821b87d0-2022-4f50-adcd-76ddae52c5dboauth_signature=Q01ZADdBJNh5dbltMMQXP37EkVg%3Doauth_signature_method=HMAC-SHA1oauth_timestamp=1281177991oauth_version=1.0 Are you using an OAuth library for this? Taylor On Sat, Aug 7, 2010 at 5:32 PM, execut...@gmail.com execut...@gmail.com mailto:execut...@gmail.com mailto:execut...@gmail.com mailto:execut...@gmail.com wrote: the link below is broken,, On Sat, Aug 7, 2010 at 4:44 PM, Tom allerleiga...@gmail.com mailto:allerleiga...@gmail.com mailto:allerleiga...@gmail.com mailto:allerleiga...@gmail.com wrote: How are you generating the signature? Tom On Aug 7, 2:43 pm, Punit.khaire punit.kha...@gmail.com mailto:punit.kha...@gmail.com mailto:punit.kha...@gmail.com mailto:punit.kha...@gmail.com wrote: Hi guys, I started to work on the
Re: [twitter-dev] Re: The remote server returned an error: (401) Unauthorized
Thanks Tom, We are using Eset antivirus and it is also firewalled.I am getting below error when executing Request token API, *An existing connection was forcibly closed by the remote host* For more info you can hit below URL, http://203.78.217.115/TwitterOAUTH/Default.aspx Thanks, Punit. On Tue, Aug 10, 2010 at 4:45 PM, Tom van der Woerdt i...@tvdw.eu wrote: Sorry for the double post, but I just realized: is your public IP firewalled? That could possibly be the issue. Also, is the error you are getting a Firefox (or any browser) error, or an OAuth/Twitter error? Tom On 8/10/10 1:11 PM, punit khaire wrote: Hi, Thanks, for the reply, But then why site working from the localhost on the same Computer.But If I accessed it from Public IP it returns error. Thanks, Punit Khaire. On Tue, Aug 10, 2010 at 4:13 PM, Tom van der Woerdt i...@tvdw.eu mailto:i...@tvdw.eu wrote: Twitter doesn't really care about IPs - unless you are doing things really, really, really wrong. Assuming that the signature generation stays the same (some platforms have little-endian BO, big-endian BO, etc, and that may change the algorithm a bit, but when windows-windows that doesn't really apply), the most likely cause of this error is the timestamp of the computer running the application. Tom On 8/10/10 12:07 PM, punit khaire wrote: Hey Taylor Thanks,for reply, My problem redirect is solved.Now the problem is , I developed website for twitter OAuth using .net 2.0,I deployed that application in public IP, and suddenly I got following error, /An existing connection was forcibly closed by the remote host./ But when I run the same application from localhost on same IP,It is working fine.And gives error when It redirected to my Public IP Call back URl. I couldnt figure out is it website issue or Public IP issue. Thanks for help in advance, Punit On Mon, Aug 9, 2010 at 7:45 PM, Taylor Singletary taylorsinglet...@twitter.com mailto:taylorsinglet...@twitter.com mailto:taylorsinglet...@twitter.com mailto:taylorsinglet...@twitter.com wrote: Hi Punit, First, some advice: I recommend using HTTP header-based OAuth rather than putting your OAuth parameters directly in the query string. It separates concerns and makes your debugging ultimately easier. That said, the first issue you're probably running into is that you aren't URL-encoding your OAuth Callback properly. In fact, when you're presenting any of these OAuth parameters, whether it was via HTTP header or query string, you need to do some more escaping. For our servers to properly interpret the URL you are sending, your request would need to look a bit more like (noting that the signature would be significantly different as a result): http://api.twitter.com/oauth/request_token?oauth_callback=http%3A%2F%2F203.78.217.115%2FIssueManager%2FLogin.aspoauth_consumer_key=ilmsYrfa0XjtsqJXCB6HcQoauth_nonce=821b87d0-2022-4f50-adcd-76ddae52c5dboauth_signature=Q01ZADdBJNh5dbltMMQXP37EkVg%3Doauth_signature_method=HMAC-SHA1oauth_timestamp=1281177991oauth_version=1.0 http://api.twitter.com/oauth/request_token?oauth_callback=http%3A%2F%2F203.78.217.115%2FIssueManager%2FLogin.aspoauth_consumer_key=ilmsYrfa0XjtsqJXCB6HcQoauth_nonce=821b87d0-2022-4f50-adcd-76ddae52c5dboauth_signature=Q01ZADdBJNh5dbltMMQXP37EkVg%3Doauth_signature_method=HMAC-SHA1oauth_timestamp=1281177991oauth_version=1.0 http://api.twitter.com/oauth/request_token?oauth_callback=http%3A%2F%2F203.78.217.115%2FIssueManager%2FLogin.aspoauth_consumer_key=ilmsYrfa0XjtsqJXCB6HcQoauth_nonce=821b87d0-2022-4f50-adcd-76ddae52c5dboauth_signature=Q01ZADdBJNh5dbltMMQXP37EkVg%3Doauth_signature_method=HMAC-SHA1oauth_timestamp=1281177991oauth_version=1.0 http://api.twitter.com/oauth/request_token?oauth_callback=http%3A%2F%2F203.78.217.115%2FIssueManager%2FLogin.aspoauth_consumer_key=ilmsYrfa0XjtsqJXCB6HcQoauth_nonce=821b87d0-2022-4f50-adcd-76ddae52c5dboauth_signature=Q01ZADdBJNh5dbltMMQXP37EkVg%3Doauth_signature_method=HMAC-SHA1oauth_timestamp=1281177991oauth_version=1.0 Are you using an OAuth library for this? Taylor On Sat, Aug 7, 2010 at 5:32 PM, execut...@gmail.com execut...@gmail.com mailto:execut...@gmail.com mailto:execut...@gmail.com mailto:execut...@gmail.com wrote: the link below is broken,, On Sat, Aug 7, 2010 at 4:44 PM, Tom allerleiga...@gmail.com mailto:allerleiga...@gmail.com
Re: [twitter-dev] Re: The remote server returned an error: (401) Unauthorized
Ah, okay, you mean the .NET error page. Well, to be honest, I don't know a bit about .NET. Luckily, I do know how Twitter works :-) Can you show a dump of the request to Twitter? (Could it be that the error you get is because Twitter generates a 401 error? In that case, your signature generation may be wrong.) Tom On 8/10/10 1:21 PM, punit khaire wrote: Thanks Tom, We are using Eset antivirus and it is also firewalled.I am getting below error when executing Request token API, /An existing connection was forcibly closed by the remote host/ For more info you can hit below URL, http://203.78.217.115/TwitterOAUTH/Default.aspx Thanks, Punit. On Tue, Aug 10, 2010 at 4:45 PM, Tom van der Woerdt i...@tvdw.eu mailto:i...@tvdw.eu wrote: Sorry for the double post, but I just realized: is your public IP firewalled? That could possibly be the issue. Also, is the error you are getting a Firefox (or any browser) error, or an OAuth/Twitter error? Tom On 8/10/10 1:11 PM, punit khaire wrote: Hi, Thanks, for the reply, But then why site working from the localhost on the same Computer.But If I accessed it from Public IP it returns error. Thanks, Punit Khaire. On Tue, Aug 10, 2010 at 4:13 PM, Tom van der Woerdt i...@tvdw.eu mailto:i...@tvdw.eu mailto:i...@tvdw.eu mailto:i...@tvdw.eu wrote: Twitter doesn't really care about IPs - unless you are doing things really, really, really wrong. Assuming that the signature generation stays the same (some platforms have little-endian BO, big-endian BO, etc, and that may change the algorithm a bit, but when windows-windows that doesn't really apply), the most likely cause of this error is the timestamp of the computer running the application. Tom On 8/10/10 12:07 PM, punit khaire wrote: Hey Taylor Thanks,for reply, My problem redirect is solved.Now the problem is , I developed website for twitter OAuth using .net 2.0,I deployed that application in public IP, and suddenly I got following error, /An existing connection was forcibly closed by the remote host./ But when I run the same application from localhost on same IP,It is working fine.And gives error when It redirected to my Public IP Call back URl. I couldnt figure out is it website issue or Public IP issue. Thanks for help in advance, Punit On Mon, Aug 9, 2010 at 7:45 PM, Taylor Singletary taylorsinglet...@twitter.com mailto:taylorsinglet...@twitter.com mailto:taylorsinglet...@twitter.com mailto:taylorsinglet...@twitter.com mailto:taylorsinglet...@twitter.com mailto:taylorsinglet...@twitter.com mailto:taylorsinglet...@twitter.com mailto:taylorsinglet...@twitter.com wrote: Hi Punit, First, some advice: I recommend using HTTP header-based OAuth rather than putting your OAuth parameters directly in the query string. It separates concerns and makes your debugging ultimately easier. That said, the first issue you're probably running into is that you aren't URL-encoding your OAuth Callback properly. In fact, when you're presenting any of these OAuth parameters, whether it was via HTTP header or query string, you need to do some more escaping. For our servers to properly interpret the URL you are sending, your request would need to look a bit more like (noting that the signature would be significantly different as a result): http://api.twitter.com/oauth/request_token?oauth_callback=http%3A%2F%2F203.78.217.115%2FIssueManager%2FLogin.aspoauth_consumer_key=ilmsYrfa0XjtsqJXCB6HcQoauth_nonce=821b87d0-2022-4f50-adcd-76ddae52c5dboauth_signature=Q01ZADdBJNh5dbltMMQXP37EkVg%3Doauth_signature_method=HMAC-SHA1oauth_timestamp=1281177991oauth_version=1.0 http://api.twitter.com/oauth/request_token?oauth_callback=http%3A%2F%2F203.78.217.115%2FIssueManager%2FLogin.aspoauth_consumer_key=ilmsYrfa0XjtsqJXCB6HcQoauth_nonce=821b87d0-2022-4f50-adcd-76ddae52c5dboauth_signature=Q01ZADdBJNh5dbltMMQXP37EkVg%3Doauth_signature_method=HMAC-SHA1oauth_timestamp=1281177991oauth_version=1.0
Re: [twitter-dev] Re: The remote server returned an error: (401) Unauthorized
The error 401 is at initail stage now as I said below is the error I think it is not resolving the ports properly.Because it is running on port but not working on any other port. Thanks, Punit. On Tue, Aug 10, 2010 at 4:56 PM, Tom van der Woerdt i...@tvdw.eu wrote: Ah, okay, you mean the .NET error page. Well, to be honest, I don't know a bit about .NET. Luckily, I do know how Twitter works :-) Can you show a dump of the request to Twitter? (Could it be that the error you get is because Twitter generates a 401 error? In that case, your signature generation may be wrong.) Tom On 8/10/10 1:21 PM, punit khaire wrote: Thanks Tom, We are using Eset antivirus and it is also firewalled.I am getting below error when executing Request token API, /An existing connection was forcibly closed by the remote host/ For more info you can hit below URL, http://203.78.217.115/TwitterOAUTH/Default.aspx Thanks, Punit. On Tue, Aug 10, 2010 at 4:45 PM, Tom van der Woerdt i...@tvdw.eu mailto:i...@tvdw.eu wrote: Sorry for the double post, but I just realized: is your public IP firewalled? That could possibly be the issue. Also, is the error you are getting a Firefox (or any browser) error, or an OAuth/Twitter error? Tom On 8/10/10 1:11 PM, punit khaire wrote: Hi, Thanks, for the reply, But then why site working from the localhost on the same Computer.But If I accessed it from Public IP it returns error. Thanks, Punit Khaire. On Tue, Aug 10, 2010 at 4:13 PM, Tom van der Woerdt i...@tvdw.eu mailto:i...@tvdw.eu mailto:i...@tvdw.eu mailto:i...@tvdw.eu wrote: Twitter doesn't really care about IPs - unless you are doing things really, really, really wrong. Assuming that the signature generation stays the same (some platforms have little-endian BO, big-endian BO, etc, and that may change the algorithm a bit, but when windows-windows that doesn't really apply), the most likely cause of this error is the timestamp of the computer running the application. Tom On 8/10/10 12:07 PM, punit khaire wrote: Hey Taylor Thanks,for reply, My problem redirect is solved.Now the problem is , I developed website for twitter OAuth using .net 2.0,I deployed that application in public IP, and suddenly I got following error, /An existing connection was forcibly closed by the remote host./ But when I run the same application from localhost on same IP,It is working fine.And gives error when It redirected to my Public IP Call back URl. I couldnt figure out is it website issue or Public IP issue. Thanks for help in advance, Punit On Mon, Aug 9, 2010 at 7:45 PM, Taylor Singletary taylorsinglet...@twitter.com mailto:taylorsinglet...@twitter.com mailto:taylorsinglet...@twitter.com mailto:taylorsinglet...@twitter.com mailto:taylorsinglet...@twitter.com mailto:taylorsinglet...@twitter.com mailto:taylorsinglet...@twitter.com mailto:taylorsinglet...@twitter.com wrote: Hi Punit, First, some advice: I recommend using HTTP header-based OAuth rather than putting your OAuth parameters directly in the query string. It separates concerns and makes your debugging ultimately easier. That said, the first issue you're probably running into is that you aren't URL-encoding your OAuth Callback properly. In fact, when you're presenting any of these OAuth parameters, whether it was via HTTP header or query string, you need to do some more escaping. For our servers to properly interpret the URL you are sending, your request would need to look a bit more like (noting that the signature would be significantly different as a result): http://api.twitter.com/oauth/request_token?oauth_callback=http%3A%2F%2F203.78.217.115%2FIssueManager%2FLogin.aspoauth_consumer_key=ilmsYrfa0XjtsqJXCB6HcQoauth_nonce=821b87d0-2022-4f50-adcd-76ddae52c5dboauth_signature=Q01ZADdBJNh5dbltMMQXP37EkVg%3Doauth_signature_method=HMAC-SHA1oauth_timestamp=1281177991oauth_version=1.0
Re: [twitter-dev] Re: The remote server returned an error: (401) Unauthorized
Hi Punit, First, some advice: I recommend using HTTP header-based OAuth rather than putting your OAuth parameters directly in the query string. It separates concerns and makes your debugging ultimately easier. That said, the first issue you're probably running into is that you aren't URL-encoding your OAuth Callback properly. In fact, when you're presenting any of these OAuth parameters, whether it was via HTTP header or query string, you need to do some more escaping. For our servers to properly interpret the URL you are sending, your request would need to look a bit more like (noting that the signature would be significantly different as a result): http://api.twitter.com/oauth/request_token?oauth_callback=http%3A%2F%2F203.78.217.115%2FIssueManager%2FLogin.aspoauth_consumer_key=ilmsYrfa0XjtsqJXCB6HcQoauth_nonce=821b87d0-2022-4f50-adcd-76ddae52c5dboauth_signature=Q01ZADdBJNh5dbltMMQXP37EkVg%3Doauth_signature_method=HMAC-SHA1oauth_timestamp=1281177991oauth_version=1.0 Are you using an OAuth library for this? Taylor On Sat, Aug 7, 2010 at 5:32 PM, execut...@gmail.com execut...@gmail.comwrote: the link below is broken,, On Sat, Aug 7, 2010 at 4:44 PM, Tom allerleiga...@gmail.com wrote: How are you generating the signature? Tom On Aug 7, 2:43 pm, Punit.khaire punit.kha...@gmail.com wrote: Hi guys, I started to work on the twitter application .Our main task is to tweet messages using oAuth authentication. I am sending below request using GET method, http://api.twitter.com/oauth/request_token?oauth_callback=http://203.. .. When I manually hit the above URl I get following error message, Failed to validate oauth signature and token I dont understand y I get this message,as I am sending everything in my parameter list. Am I missing something here,thanks in advance for any help. -- -- Michael J.D Saguri 1-250-999-0890 http://www.tweep.net Skype: marketingmaniac
[twitter-dev] Re: The remote server returned an error: (401) Unauthorized
How are you generating the signature? Tom On Aug 7, 2:43 pm, Punit.khaire punit.kha...@gmail.com wrote: Hi guys, I started to work on the twitter application .Our main task is to tweet messages using oAuth authentication. I am sending below request using GET method, http://api.twitter.com/oauth/request_token?oauth_callback=http://203 When I manually hit the above URl I get following error message, Failed to validate oauth signature and token I dont understand y I get this message,as I am sending everything in my parameter list. Am I missing something here,thanks in advance for any help.
Re: [twitter-dev] Re: The remote server returned an error: (401) Unauthorized
the link below is broken,, On Sat, Aug 7, 2010 at 4:44 PM, Tom allerleiga...@gmail.com wrote: How are you generating the signature? Tom On Aug 7, 2:43 pm, Punit.khaire punit.kha...@gmail.com wrote: Hi guys, I started to work on the twitter application .Our main task is to tweet messages using oAuth authentication. I am sending below request using GET method, http://api.twitter.com/oauth/request_token?oauth_callback=http://203 When I manually hit the above URl I get following error message, Failed to validate oauth signature and token I dont understand y I get this message,as I am sending everything in my parameter list. Am I missing something here,thanks in advance for any help. -- -- Michael J.D Saguri 1-250-999-0890 http://www.tweep.net Skype: marketingmaniac
[twitter-dev] Re: The remote server returned an error: (401) Unauthorized.
On Fri, 2009-07-24 at 13:43 -0700, HatMan wrote: Working in C# trying to send a tweet using Basic Auth with my own current credentials from a Vista machine running IIS7. Any reason why I am getting 401 Unauthorized? try { string user = Convert.ToBase64String (System.Text.Encoding.UTF8.GetBytes(metroUserName + : + metroPassword)); byte[] bytes = System.Text.Encoding.ASCII.GetBytes (status= + tweetText); HttpWebRequest request = (HttpWebRequest)WebRequest.Create (http://twitter.com/statuses/update.xml;); request.Method = POST; request.ServicePoint.Expect100Continue = false; request.Headers.Add(Authorization, Basic + user); request.ContentType = application/x-www-form-urlencoded; request.ContentLength = bytes.Length; Stream reqStream = request.GetRequestStream(); reqStream.Write(bytes, 0, bytes.Length); reqStream.Close(); HttpWebResponse response = (HttpWebResponse) request.GetResponse(); Stream responseStream = response.GetResponseStream(); StreamReader returned = new StreamReader(responseStream); // what is returned at this point validationLabel.Text = returned.ReadToEnd(); } catch (Exception ex) { validationLabel.Text = ex.Message; } You're actually going the wrong way about sending credentials--you shouldn't be adding headers willy nilly, let the .NET Framework classes negotiate that for you. This is how I do Basic Auth in my Twitter API implementation: var webRequest = WebRequest.Create (uri); var ccache = new CredentialCache (); ccache.Add (uri, Basic, new NetworkCredential (userName, password)); webRequest.Credentials = ccache; From here, you can use your code to send the POST request and read the response. :) If you want to use my Twitter API implementation (written in C#), you can check it out at http://code.google.com/p/twarp/ and fetch the source code. There aren't really many examples at the moment, but the XML documentation is pretty much all there, and I think the API is simple enough to explore via IntelliSense. Regards, -- Bojan Rajkovic boj...@brandeis.edu Biochemistry '10, Brandeis University PGP Signature Key ID: 0x8783D016 PGP Encryption Key ID: 0x2497B8B2 signature.asc Description: This is a digitally signed message part