Skip to content

Support logged in queries #60

@essential-randomness

Description

@essential-randomness

From this discord discussion, where @ nianeyna outlined her research on how to query AO3 using logged in credentials:

"This is the simplified explanation:

  • check your cookie store (in this case I guess it would be some value you have the client pass in) for an _otwarchive_session cookie that is not expired
  • if you have one, set the 'cookie' header on the request based on its value, and make the request. you may need to follow redirects here to get to the actual page you want.
  • if you don't have one, make a GET request to the ao3 login form
  • then scrape the authenticity_token and the otwarchive_session cookie from it
  • then make a POST request to the ao3 login form with a username and password and the authenticity token, setting the cookie header here as well. again you may need to follow redirects. importantly, you need to shepherd your cookies through all the redirects. actually that's true of the above as well.
  • hopefully at this point you will have a valid _otwarchive_session cookie from the response you got from the post request. see step 2"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions