Results 1 to 5 of 5

Thread: How to use OAuth 1.0 in Visual Basic?

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Dec 2013
    Location
    Earth
    Posts
    230

    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

  2. #2
    New Member
    Join Date
    Jun 2017
    Posts
    1

    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

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Dec 2013
    Location
    Earth
    Posts
    230

    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.

  4. #4
    You don't want to know.
    Join Date
    Aug 2010
    Posts
    4,578

    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.

  5. #5
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: How to use OAuth 1.0 in Visual Basic?

    Seems you are missing the key and secret info?

    Seems they have a tutorial, not sure if you seen it?

    http://requests-oauthlib.readthedocs...es/tumblr.html
    http://requests-oauthlib.readthedocs..._workflow.html
    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 PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI 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
  •  



Click Here to Expand Forum to Full Width