kalkih / passport-appointment-bot

Bot to automatically find and book appointment for renewal/creation of a Swedish passport or national identity card.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

đŸ€– 🛂 passport-appointment-bot 🛂 đŸ€–

⚠ For educational use only ⚠

Bot to automatically find and book an appointment for renewal/creation of a Swedish passport or national identity card.

Bott som automatiskt söker och bokar första lediga tid för att förnya pass och/eller nationellt id kort.

What does it do?

The bot searches for available appointments until one is found, it then tries to book the appointment. The bot will run until an appointment is successfully booked.
The bot can be configured to search for appointments in a specific region & in one or more cities at a time.
It can also be configured to run several concurrent booking sessions in order to increase searching speed & search multiple locations at the same time.

How to run

Download config.json & passport-appointment-bot for your OS from the latest release, place them in the same folder.

  1. Edit the configuration file downloaded (config.json) with any text editor, see Configuration for information on the options
  2. Run the executable downloaded earlier passport-appointment-bot
  3. The bot will prompt for BankID identification (The booking system now requires BankID idetification to start a booking session)
  4. The bot will search until an appointment is found
  5. A booking confirmation will be sent to the configured email and/or phone number specified in the config, it will also be displayed in the application

(Advanced) Run from source

Requires Nodejs (Tested on v17.7.1)

  1. Clone the project, install dependencies with npm install
  2. Edit configuration values in config.json, see Configuration for information on the options
  3. Run the bot with npm start
  4. The bot will prompt for BankID identification (The booking system now requires BankID idetification to start a booking session)
  5. The bot will search until an appointment is found
  6. A booking confirmation will be sent to the configured email and/or phone number specified in the config, it will also be displayed in the console

Configuration

Basic configuration options

Option Required Description
region ✅ Desired region, see Supported Regions & Locations
locations ✅ One or more cities/locations, see Supported Regions & Locations
max_date ✅ Latest date to search for appointment (will search all days in the week of the specified date)
min_date ❌ Earliest date to search for appointment (will search all days in the week of the specified date)
booking_number ❌ An existing booking number to use when searching for available times.
email ✅ Email (confirmation will be sent to this address)
phone ✅ Phone number (confirmation will be sent to this number)
passport ✅ Set to true if the booking appointment is for passport, else false
id ✅ Set to true if the booking appointment is for national identity card, else false
confirmation ✅ Method for receiving booking confirmation email and/or sms

Multiple people booking options

When booking for more than the person identifying with BankID, use these options to provide personal details for the other people (Do not include personal details for the person idetifying with BankID).

Option Required Description
extra_personnummer ❌ Additional Personnummer / Social security number(s), when booking for more than one person e.g. ["199401018453", "199601016406"]
extra_firstnames ❌ Additional firstname(s), when booking for more than one person e.g. ["John", "Jane"]
extra_lastnames ❌ Additional lastname(s), when booking for more than one person e.g. ["Doe", "Doe"]

Advanced configuration options

Option Required Default Description
sessions ❌ 1 Number of concurrent booking sessions to run, higher number equals faster checking of available times and opens up for checking multiple locations in parallel, (will still just book one appointment in the end) (max 6)
throttle ❌ 0 The time to wait in seconds between searches
useProxies ❌ false Set to true to use proxies for booking sessions, (a proxy list is required, see Proxy information for additional information.
proxyTimeout ❌ 30 When using setProxies use this option to set the timeout in seconds before a proxy request should timeout and retry.
proxyRetries ❌ 3 When using setProxies use this option to set the number of request retries with each proxy before switching proxy..

Good to know

  • Only one appointment can be booked per email and phone number.
  • Both passport & national identity card can be renewed in one appointment, both options can therefore be set to true.
  • Searching for appointment for more than one person at a time requires a longer appointment time and are thus harder to find.
  • A maximum of 8 people can be booked in one appointment

Related projects

Supported Regions & Locations

Supported regions & locations can also be found in the src/locations.js file.

Blekinge

  • Karlshamn
  • Karlskrona

Dalarna

  • Avesta
  • BorlĂ€nge
  • Ludvika
  • Mora

Gotland

  • Visby

GĂ€vleborg

  • BollnĂ€s
  • GĂ€vle
  • Hudiksvall

Halland

  • Falkenberg
  • Halmstad
  • Kungsbacka
  • Varberg

JĂ€mtland

  • FunĂ€sdalen
  • Strömsund
  • Sveg
  • Åre
  • Östersund

Jönköping

  • Eksjö
  • Jönköping
  • VĂ€rnamo

Kalmar

  • Kalmar
  • Oskarshamn
  • VĂ€stervik

Kronoberg

  • Ljungby
  • VĂ€xjö
  • Älmhult

Norrbotten

  • Arvidsjaur
  • Boden
  • GĂ€llivare
  • Haparanda
  • Kalix
  • Kiruna
  • LuleĂ„
  • PiteĂ„

SkÄne

  • Eslöv
  • Helsingborg
  • HĂ€ssleholm
  • Klippan
  • Kristianstad
  • Landskrona
  • Lund
  • Malmö
  • Trelleborg
  • Ystad
  • Ängelholm

Stockholm

  • Flemingsberg
  • Globen
  • Haninge
  • JĂ€rva
  • Nacka
  • NorrtĂ€lje
  • Sollentuna
  • Solna
  • Sthlm City
  • SödertĂ€lje
  • Södra Roslagen

Södermanland

  • Eskilstuna
  • Katrineholm
  • Nyköping
  • Skavsta
  • StrĂ€ngnĂ€s

Uppsala

  • Enköping
  • Tierp
  • Uppsala
  • Östhammar

VĂ€rmland

  • Arvika
  • Karlstad
  • Kristinehamn
  • Torsby

VĂ€sterbotten

  • Lycksele
  • SkellefteĂ„
  • Storuman
  • UmeĂ„
  • Vilhelmina

VĂ€sternorrland

  • HĂ€rnösand
  • Kramfors
  • SollefteĂ„
  • Sundsvall
  • Ånge
  • Örnsköldsvik

VĂ€stmanland

  • Fagersta
  • Köping
  • Sala
  • VĂ€sterĂ„s

VÀstraGötaland

  • AlingsĂ„s
  • BorĂ„s
  • Falköping
  • Göteborg
  • Lidköping
  • Mariestad
  • Mark/Kinna
  • Mölndal
  • Skövde
  • Stenungsund
  • Strömstad
  • TrollhĂ€ttan
  • Uddevalla
  • Ulricehamn
  • ÅmĂ„l

Örebro

  • Hallsberg
  • Karlskoga
  • Lindesberg
  • Vivalla
  • Örebro

Östergötland

  • Linköping
  • Motala
  • Norrköping

Proxy feature information

When setting the useProxies option to true you are expected to provide a list of proxies to use, the application expects a file named proxies.txt to be present in the same directory as the application. This file should include one proxy per line, the proxy should be in the format [IP]:[PORT].

Example

0.0.0.0:6969
1.1.1.1:9999
2.2.2.2:420

This feature does currently only support HTTP/HTTPS proxies.

The application will cycle through the proxies in the list and will retry the request if the proxy is not responding, if a request times out multiple times with the same proxy, the application will switch to the next proxy in the list.
The thresholds for this behaviour can be configured through the proxyTimeout and proxyRetries configuration options.

For the best results use a list of high quality proxies.

About

Bot to automatically find and book appointment for renewal/creation of a Swedish passport or national identity card.


Languages

Language:TypeScript 98.5%Language:JavaScript 1.5%