|
-
Jun 21st, 2017, 05:56 PM
#1
Thread Starter
Addicted Member
How to use OAuth 1.0 in Visual Basic?
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:
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""")
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/
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
-
Jun 22nd, 2017, 07:48 PM
#2
New Member
Re: How to use OAuth 1.0 in Visual Basic?
Oauth has unique handshakes you cant just send a post with headers and expect it to work. I suggest using Javas tumblr api they already have it coded. Or python
Bots with tumblr arent really good the api are limited and if youre doing blackhat stuff youll need load of proxies
twitter has twitter jail and limits for new users. they take forever to build up
good luck
-
Jun 22nd, 2017, 09:39 PM
#3
Thread Starter
Addicted Member
Re: How to use OAuth 1.0 in Visual Basic?
Oauth has unique handshakes you cant just send a post with headers and expect it to work.
Thanks for the tip. I guess my question is now, is it worth it to learn, because even still I'm having trouble finding guides and examples.
-
Jun 23rd, 2017, 07:44 AM
#4
Re: How to use OAuth 1.0 in Visual Basic?
I haven't ever specifically used Tumblr, and I'm only casually familiar with OAuth. But the documentation makes it sound like that field is a digital signature you generate and register ahead of time with Tumblr to strengthen identity verification of your requests. Or it's possible they generate it and give it to you.
This answer is wrong. You should be using TableAdapter and Dictionaries instead.
-
Jun 23rd, 2017, 11:46 AM
#5
Re: How to use OAuth 1.0 in Visual Basic?
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|