Hi everyone! I'm trying to make a bot for Tumblr or Twitter, but both require OAuth requests. I'm not sure how to use a Net.WebRquest this way. I've searched all over and found very scarce information. I believe I am supposed to add some credentials in the header. This is what I have tried:
Assuming APIKEY and TOKEN are valid, I am still getting Error 401: Unauthorized. Also, what do I put in "oauth_signature"? That did not make any sense to me. This website contained the most useful information: https://oauth.net/core/1.0a/Code:Dim request As WebRequest = WebRequest.Create(URL) request.Headers.Add(HttpRequestHeader.Authorization, $"OAuth realm=""https://api.tumblr.com/"", oauth_consumer_key=""{APIKEY}"", oauth_token=""{TOKEN}"", oauth_signature_method=""HMAC-SHA1"", oauth_signature=""?"", oauth_timestamp=""{(Now - New DateTime(1970, 1, 1)).TotalSeconds}"", oauth_nonce=""{Now.GetHashCode()}"", oauth_version=""1.0""")
Has anyone else here dealt with OAuth requests before, that can help me? If there were any examples out there, that would be wonderful. Thank you so much in advance.
~Nic




Reply With Quote
