Git Product home page Git Product logo

Comments (5)

wxllow avatar wxllow commented on August 22, 2024 1

They modified their API to require some additional headers as well as adding an extra slash after the URL... but i fixed it in latest commit :) #f6ef128

Still haven't fixed the login yet but i'm working on it rn :)

from whatnot.

wxllow avatar wxllow commented on August 22, 2024

from whatnot.

tingofurro avatar tingofurro commented on August 22, 2024

Sorry for the late reply, I was able to debug a bit more and have come to this minimal code:

import requests
device_id = "aea87c97-aaba-4426-ae44-d3db92e188d9"
user_agent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko)"

url = "https://api.whatnot.com/api/login"

response = requests.post(url, json={"username": username, "password": password, "device_id": device_id}, headers={"User-Agent": user_agent})
print(response.status_code)
print(response.json())

Which prints:

400
{'msg': 'Please upgrade your app to the latest version'}

I was also able to manually obtain the access token (by looking in the browser), and when I try to run usual commands, I get:

404, message='Not Found', url=URL('https://api.whatnot.com/graphql')

Is it possible they modified their API? Does the current library still work for you or others?

Thanks, I hope I can figure it out, it's been super useful.

from whatnot.

tingofurro avatar tingofurro commented on August 22, 2024

Hey @wxllow , I appreciate your help.
I saw that you worked on the project recently, but commented the logging in part.
Is there a way to log in non-programmatically: logging in on the browser, and somehow saving the session and using it in the app?

I appreciate that you might not have time to work on this, so no worries. I'd be happy to help, but I am unsure on a how to "reverse engineer" their API and its requirements...

from whatnot.

wxllow avatar wxllow commented on August 22, 2024

What I do to reverse engineer their API is basically going on the website and using the Network tab in Chrome's developer tools to analyze the requests that the site makes to their APIs

from whatnot.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.