Skip to content

BrickLink Access

rgriebl edited this page Oct 1, 2024 · 2 revisions

Database rebuild

The hourly job that (re)builds BrickStore's database uses a dedicated BrickLink account to login (from GitHub servers, unless debugging is required) and then download the following:

BrickStore itself

As for the main BrickStore app that runs on the users machine, there are 3 types of requests: unauthenticated, unauthenticated with API key and authenticated.

  1. Unauthenticated requests are used to download item pictures:

  2. Unauthenticated with API key requests are used for price-guide data:

  3. Authenticated is used for all other requests: store inventory, order lists, shopping carts, wanted lists:

Authentication

As for the authentication itself, BrickStore simulates a web browser:

  1. It logs in via:

  2. It then tries to keep the login session alive by requesting both of these every 30min:

  3. If any request returns a 302 redirection to v2/login/page or login.asp?, BrickStore will try to log in via (1.) again and then resend the request.

  4. If the user changes their credentials in BrickStore, and BrickStore thinks it is currently logged in, it will log out via /ajax/renovate/loginandout.ajax first, before logging in via (1.) again.

  5. The first login is done lazily. This means that BrickStore will not log into BrickLink, unless an user action requires it.

Clone this wiki locally