1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

My bot has stopped working, how to handle new x-twitter-auth-type/authorization

Discussion in 'Twitter' started by jamie3000, Jun 16, 2017.

  1. jamie3000

    jamie3000 Supreme Member

    Joined:
    Jun 30, 2014
    Messages:
    1,309
    Likes Received:
    586
    Occupation:
    Finance coder looking for semi-retirement
    Location:
    uk
    Hi All,

    I have a free twitter bot people use. A month or so ago it stopped being able to follow/unfollow due to changes in the way twitter works. Look like they've change the URL (which is obviously easy to change in my code) and the auth for following/unfollowing. Anyone know how to generate the new authorization bearer header? I can't see the token anywhere in the HTML or headers the twitter server outputs. There is a reference in the webpack JS https://ma-0.twimg.com/twitter-assets/responsive-web/web/ltr/main.567ae3b46963f1df.js about BEARER_TOKEN are you guys just parsing that?

    Any advise from fellow botters welcome :)
     
  2. next2doors

    next2doors Newbie

    Joined:
    Apr 24, 2012
    Messages:
    25
    Likes Received:
    1
    I found this Bearer in this file:
    https://abs.twimg.com/k/en/init.en.37d4e85afd8ede9741dd.js
    Bearer = 'Bearer AAAAAAAAAAAAAAAAAAAAAPYXBAAAAAAACLXUNDekMxqa8h%2F40K4moUkGsoc%3DTYfbDKbT3jJPCEVnMYqilB28NHfOPqkca3qaAxGfsyKCs0wRbw'
     
    • Thanks Thanks x 1
  3. jamie3000

    jamie3000 Supreme Member

    Joined:
    Jun 30, 2014
    Messages:
    1,309
    Likes Received:
    586
    Occupation:
    Finance coder looking for semi-retirement
    Location:
    uk
  4. Charles Roberto

    Charles Roberto Newbie

    Joined:
    Jun 3, 2017
    Messages:
    16
    Likes Received:
    3
    Gender:
    Female
    I can look over the code for you for free. PM if interested.
     
  5. jamie3000

    jamie3000 Supreme Member

    Joined:
    Jun 30, 2014
    Messages:
    1,309
    Likes Received:
    586
    Occupation:
    Finance coder looking for semi-retirement
    Location:
    uk
    Thanks for the offer mate, but I got this sorted now. Extracted the bearer from is and cto csrf token header is in the cookie. So it's all good :)