Is it possible to interact with session based APIs on websites I don't own with Quasar?

  • Hi,

    I’m looking to have a desktop and mobile app built that interacts with private, session based APIs on specific websites. I do not own nor have any control over said websites. Is this possible with Quasar?

    • Check if someone is logged into (for example)
    • If they’re not logged in, show them to the login page on the Amazon website
    • Use the authentication cookie to send a request to<api_endpoint>
    • Store the returned data in a local database

    The part I’m unsure about is if it’s possible to act as the authenticated user somehow. Can cookies be collected and used? Is there a built in browser that could be used for both login and API requests?

    I’ll be doing this for 5+ different websites and compiling the data, so this same process would need to be duplicated across all of those websites.

    Is this possible with Quasar? I really like the promise of this framework so I’m hoping it is!

  • Quasar is a High Performance Full Frontend Stack. With Quasar you can easily manage Cookies and other stuff, but I think what you’re looking for are Social Login functionalities.

    Have a look at vue-authenticate, which implements most of the famous social login OAuths, or use Firebase to achieve the same goal.

    If you instead are asking for really private API, e.g. of your company, Quasar has little to do with it. Is more related to Vue and how the APIs are made. Since Quasar uses Vue the final answer is yes, you can, but Quasar is not going to be the tool to do it (also, Quasar is not nor has a builtin browser in it).

  • @narmer23

    Not all of the websites I’ll need to interact with will have social login, so I don’t think that’s quite what I’m after.

    My end goal is to compile sales data from 5 different sources into one desktop/mobile app. Each website has their own sales dashboard which loads data from their own private API.

    So for example, on Amazon’s own website the sales dashboard fetches sales data by making an authenticated GET request to which returns a json object like {sales: 5}. I want to mimic that request in my app to get the sales data and then display it in the app.

    I’ve found some potentially useful info about cookies in Electron, but I’m really new to all of this and am not sure if I can do the same thing in Quasar. Here’s the snippet:

    // Query all cookies associated with a specific url.
    session.defaultSession.cookies.get({ url: '' }, (error, cookies) => {
      console.log(error, cookies)

    So I was thinking this could let me open a window for the user to login, then once they’re logged in, I could use that to grab the cookie and make the authenticated GET request needed to fetch their sales data.

    Is something like this possible in Quasar? I’d like to use quasar over electron if possible so that the same code could be used for mobile app as well.

Log in to reply