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

Overview

passport-appointment-bot 🛂 đŸ€–

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 eller nationellt id kort.

⚠ For educational use only ⚠

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 you downloaded (config.json) with text editor of choice, see Configuration
  2. Run the executable you downloaded passport-appointment-bot
  3. The bot will automatically exit when an appointment is booked
  4. A booking confirmation should be sent to the configured email and will also be displayed in the program

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
  3. Run the bot with npm start
  4. The bot will automatically exit when an appointment is booked
  5. A booking confirmation should be sent to the configured email and will also be displayed in the console

Configuration

All options are required

Option Description
region Desired region, see Supported Regions & Locations
locations One or more cities/locations, see Supported Regions & Locations
max_date Last date to search for appointment (will search all days in the week of the specified date)
email Your email (confirmation email will be sent to this address)
phone Your phone number
firstname Your first name
lastname Your last name
type Type of booking (passport for passport, or id for identity card)
sessions Number of concurrent booking sessions to run, higher number equals faster checking of available times and opens up for checking several locations in parallel, (will still only book one appointment in the end) (max 6)

Good to know

Only one appointment can be booked per email and phone number.

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önkoping

  • 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
Comments
  • error after running code for a while

    error after running code for a while

    I get this error: Reached maximum redirect of 20 for url "https://bokapass.nemoq.se/booking/403.htm cannot read properties of undfined (reading 'text')

    script works for like 30minutes then this message just keeps reapting.

    nice script otherwise! :)

    opened by skajagpangadig 16
  • 0 free - 0 reserved

    0 free - 0 reserved

    Not sure why this is happening. But after a while I get "0 free - 0 reserved" all the time. No error message.

    [20:58:04] [verbose]	Sthlm City (2022-05-02) 0 free - 0 reserved
    [20:58:04] [verbose]	Nacka (2022-04-04) 0 free - 0 reserved
    [20:58:04] [verbose]	NorrtÀlje (2022-05-16) 0 free - 0 reserved
    [20:58:04] [verbose]	JĂ€rva (2022-04-04) 0 free - 0 reserved
    [20:58:05] [verbose]	Sthlm City (2022-05-09) 0 free - 0 reserved
    [20:58:05] [verbose]	Nacka (2022-04-11) 0 free - 0 reserved
    [20:58:05] [verbose]	Nacka (2022-03-28) 0 free - 0 reserved
    [20:58:05] [verbose]	JĂ€rva (2022-04-11) 0 free - 0 reserved
    [20:58:06] [verbose]	Sthlm City (2022-05-16) 0 free - 0 reserved
    [20:58:06] [verbose]	Nacka (2022-04-18) 0 free - 0 reserved
    [20:58:06] [verbose]	Nacka (2022-04-04) 0 free - 0 reserved
    [20:58:06] [verbose]	JĂ€rva (2022-04-18) 0 free - 0 reserved
    [20:58:06] [verbose]	Flemingsberg (2022-03-28) 0 free - 0 reserved
    [20:58:06] [verbose]	Nacka (2022-04-25) 0 free - 0 reserved
    [20:58:06] [verbose]	Nacka (2022-04-11) 0 free - 0 reserved
    [20:58:07] [verbose]	JĂ€rva (2022-04-25) 0 free - 0 reserved
    [20:58:07] [verbose]	Flemingsberg (2022-04-04) 0 free - 0 reserved
    [20:58:07] [verbose]	Nacka (2022-05-02) 0 free - 0 reserved
    [20:58:07] [verbose]	Nacka (2022-04-18) 0 free - 0 reserved
    [20:58:07] [verbose]	JĂ€rva (2022-05-02) 0 free - 0 reserved
    [20:58:07] [verbose]	Flemingsberg (2022-04-11) 0 free - 0 reserved
    [20:58:07] [verbose]	Nacka (2022-05-09) 0 free - 0 reserved
    [20:58:08] [verbose]	Nacka (2022-04-25) 0 free - 0 reserved
    [20:58:08] [verbose]	JĂ€rva (2022-05-09) 0 free - 0 reserved
    [20:58:08] [verbose]	Flemingsberg (2022-04-18) 0 free - 0 reserved
    
    
    bug 
    opened by danwie 9
  • socket hang up

    socket hang up

    Not sure if they changed anything. Suddenly I get "socket hang up". But if I enter the booking site manually it seems to work fine (although a litte slow). I've also tried different ip-addresses (VPN) but with the same result.

    $ ./passport-appointment-bot-macos-x64 
    [13:13:52] [info]	Validating configuration...
    [13:13:52] [success]	Configuration is valid
    [13:13:52] [info]	Validating configured region...
    [13:13:52] [success]	Valid region Stockholm
    [13:13:52] [info]	Validating configured locations...
    [13:13:52] [success]	Valid locations JÀrva, Sollentuna, Solna, Sthlm City, Södra Roslagen
    [13:13:52] [info]	Starting booking session...
    [13:13:52] [verbose]	Started captcha webserver on port 51827
    
    /snapshot/pass-bot/node_modules/node-fetch/lib/index.js:1491
    			reject(new FetchError(`request to ${request.url} failed, reason: ${err.message}`, 'system', err));
    			       ^
    FetchError: request to https://bokapass.nemoq.se/Booking/Booking/Index/stockholm failed, reason: socket hang up
        at ClientRequest.<anonymous> (/snapshot/pass-bot/node_modules/node-fetch/lib/index.js:1491:11)
        at ClientRequest.emit (node:events:390:28)
        at TLSSocket.socketOnEnd (node:_http_client:471:9)
        at TLSSocket.emit (node:events:402:35)
        at endReadableNT (node:internal/streams/readable:1343:12)
        at processTicksAndRejections (node:internal/process/task_queues:83:21) {
      type: 'system',
      errno: 'ECONNRESET',
      code: 'ECONNRESET'
    }
    
    
    opened by danwie 7
  •  [error]	Failed opening captcha page Cannot read properties of undefined (reading 'pages')

    [error] Failed opening captcha page Cannot read properties of undefined (reading 'pages')

    {"level":"error","message":"Failed opening captcha page Cannot read properties of undefined (reading 'pages')","stack":"TypeError: Cannot read properties of undefined (reading 'pages')\n at CaptchaService.openCaptcha (/snapshot/pass-bot/src/services/captchaService.js:75:35)\n at processTicksAndRejections (node:internal/process/task_queues:96:5)\n at async CaptchaService.getNewVerifiedToken (/snapshot/pass-bot/src/services/captchaService.js:96:5)\n at async BookingService.init (/snapshot/pass-bot/src/services/bookingService.js:61:27)\n at async init (/snapshot/pass-bot/src/index.js:67:3)\n at async /snapshot/pass-bot/src/index.js:56:5","timestamp":"2022-04-03T17:49:16.180Z"}

    opened by dio99 7
  • The beginner of beginners - so humble, but sooooo desperate

    The beginner of beginners - so humble, but sooooo desperate

    Hello, sorry for disturbing and for asking, I know my way around a computer a bit, but know nothing about programming but I am desperate for finding a time for passport... I have done as instructed but my computer wont run "passport-appointment-bot" tried run as administrator and "kör ÀndÄ" and so on... still get a small blue screen with the text "det gÄr inte att köra den hÀr appen pÄ den hÀr datorn" and "se om du kan hitta en version för den hÀr datorn hos programvaruutgivaren". Jag har en WIndows 10 Pro, 64 bitars (Enhetsnamn ITLTW10-2106A, Processor 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz 2.80 GHz Installerat RAM-minne 16,0 GB (15,6 GB gÄr att anvÀnda) Enhets-ID 01C43306-8FFD-4DCC-8075-6CF739D77374 Produkt-ID 00330-53256-57253-AAOEM Systemtyp 64-bitars operativsystem, x64-baserad processor Penna och pekskÀrm Penn- eller tryckinmatning Àr inte tillgÀngligt för den hÀr bildskÀrmen)

    THought I give the option "Run from source a try" but do not know how to do the first step... "1.Clone the project, install dependencies with npm install" becuause I lack the knowledge...

    Is there any possibility you can help me? The "how to" you have written is probably perfect for someone who knows programming but for me its just not enough. Maybe just a little more information and if possible - with links to where I can find a good easy way to install what I need.

    Hope for the best Skulle vara oerhört tacksam för hjÀlp med detta! //Tobias

    opened by umanonearth 6
  • Something went wrong.

    Something went wrong.

    took like some hours now they done some change on booking again, error poping even after captcha is done.

    [22:06:49] [warn] Manual captcha verification required [22:06:49] [verbose] Opening captcha page... [22:06:49] [error] Something went wrong. [22:06:49] [error] Something went wrong. [22:06:49] [error] Something went wrong.

    [22:08:10] [verbose] Failed checking week of: 2022-05-30 [22:08:10] [verbose] Östersund (2022-05-30) 0 free - 0 reserved [22:08:10] [error] Something went wrong.

    {"level":"error","message":"Something went wrong.","timestamp":"2022-04-05T20:04:18.744Z"}

    breaking 
    opened by dio99 5
  • Cannot read properties of undefined (reading 'text')

    Cannot read properties of undefined (reading 'text')

    Hello! Thanks for making this project, it looks very promising 👍

    I am running the v2.2.0 .exe file on a Windows machine. It had been running for maybe an hour at most, but then I got this error: Cannot read properties of undefined (reading 'text')

    After restarting it, it's running very slow. Before it was checking about 2.5 weeks/second, now it's down to as low as 0.05. I double checked my internet connection but it remains stable at what I had before getting this error, so it shouldn't be a problem on my end.

    image

    I included my config and the error log below.

    config.json

    {
      "region": "Uppsala",
      "locations": ["Enköping", "Tierp", "Uppsala", "Östhammar"],
      "max_date": "2022-07-30",
      "email": "[email protected]",
      "phone": "0123123123",
      "firstname": ["Redacted", "Redacted", "Redacted", "Redacted", "Redacted"],
      "lastname": ["Redacted", "Redacted", "Redacted", "Redacted", "Redacted"],
      "passport": true,
      "id": false,
      "sessions": 1,
      "throttle": 0
    }
    

    .error.log

    {"level":"error","message":"request to https://bokapass.nemoq.se/Booking/Booking/Next/uppsala failed, reason: read ECONNRESET","timestamp":"2022-03-29T21:08:54.513Z"}
    {"level":"error","message":"Cannot read properties of undefined (reading 'text')","timestamp":"2022-03-29T21:08:54.515Z"}
    {"level":"error","message":"request to https://bokapass.nemoq.se/Booking/Booking/Next/uppsala failed, reason: read ECONNRESET","timestamp":"2022-03-29T21:09:09.872Z"}
    
    opened by MarcusOtter 5
  • This week: 0 free - 0 reserved

    This week: 0 free - 0 reserved

    Because the 4/4 have passed I get 0 free - 0 reserved on the whole week... someone else who have the same issue??

    [12:24:57] [verbose] Sollentuna (2022-04-04) 0 free - 0 reserved [12:24:58] [verbose] Sollentuna (2022-04-11) 0 free - 45 reserved [12:24:59] [verbose] Sollentuna (2022-04-18) 0 free - 180 reserved [12:25:00] [verbose] Sollentuna (2022-04-25) 0 free - 216 reserved [12:25:00] [verbose] Solna (2022-04-04) 0 free - 0 reserved [12:25:01] [verbose] Solna (2022-04-11) 0 free - 184 reserved [12:25:02] [verbose] Solna (2022-04-18) 0 free - 219 reserved [12:25:03] [verbose] Solna (2022-04-25) 0 free - 230 reserved [12:25:03] [verbose] Sthlm City (2022-04-04) 0 free - 0 reserved [12:25:04] [verbose] Sthlm City (2022-04-11) 0 free - 203 reserved [12:25:04] [verbose] Sthlm City (2022-04-18) 0 free - 228 reserved [12:25:05] [verbose] Sthlm City (2022-04-25) 0 free - 249 reserved

    bug 
    opened by shsh1801 4
  • Application just crash after I start it

    Application just crash after I start it

    I only get below and then it just closes.

    [21:43:37] [info] Validating configuration... [21:43:37] [success] Configuration is valid [21:43:37] [info] Validating configured region... [21:43:37] [success] Valid region SkÄne [21:43:37] [info] Validating configured locations... [21:43:37] [success] Valid locations Malmö, Lund [21:43:37] [info] Starting booking session... [21:43:37] [verbose] Started captcha webserver on port 61608

    opened by mrAaaaaa 4
  • Location not found - encoding issues

    Location not found - encoding issues

    ItŽs not possible to choose locations that have Ä,À or ö in its name. The character gets wrong encoding from the config file and location is not found because it cant be matched.

    question 
    opened by PeterSalen 4
  • Second captcha not working

    Second captcha not working

    The first captcha works now perfectly but when I found a time and the second captcha should be there it redirected me to "https://reserv.polisen.se/for-manga-anrop/" and therefore could not make the booking.

    breaking 
    opened by karlsso 4
  • 0 free 0 reserved continuously?

    0 free 0 reserved continuously?

    Is this normal? 0 free 0 reserved, 1-2 minutes into searching every time. I've switched IP's all searches via VPN aswell. Going all from sessions 1, throttle 0 to sessions 1, throttle 0.5

    My friend has the same problem and has given up.

    breaking 
    opened by 2high2die 4
Releases(v5.1.0)
Owner
Karl Kihlström
Karl Kihlström
Tutoriel en francais sur le framework Sheweny, création de bots discord pour les débutants

Tutoriel Sheweny ✹ Sheweny est un framework pour crĂ©er des bots sur discord avec discord.js. Bienvenue dans le repo du tutoriel sur le framework Shewe

Sheweny 5 Jul 29, 2022
New base bot WhatsApp 🈮 bukan self bot lagi atau buka bot yang bisa di pakai oleh bot sendiri 😎

Installation ‱ Thanks to ‱ Donate Official Group Bot ‱ Settings Instalasi Heroku Buildpack Click the deploy icon below ! > heroku/nodejs > https://g

zeeone 27 Feb 9, 2022
Find roblox bot alts.

NoMorals Alt Gen What does this do? This tool will use a predefined list of bot names on roblox, find which groups that bot is in, then scrape every o

null 32 Dec 28, 2022
Minimalistic media card for Home Assistant Lovelace UI

Mini Media Player A minimalistic yet customizable media player card for Home Assistant Lovelace UI. Inspired by Custom UI: Mini media player and custo

Karl Kihlström 1.2k Jan 5, 2023
null 8 Nov 4, 2022
A bot to automatically buy crypto periodically using Quidax API đŸ€– 💰

Quidax DCA bot This bot automatically buys crypto on your behalf on Quidax using their API while you sit back, relax and enjoy a cold one. What you ne

Edmund Ekott 18 Sep 20, 2022
It is a discord bot bot which can play lofi song in different language 24/7. It has premium system and cool embed looks with buttons. It can play youtube songs, playlists. This bot code was made by Supreme#2401. It uses djs V12

Lofi-Radio-Music-Bot It is a discord bot bot which can play lofi song in different language 24/7. It has premium system and cool embed looks with butt

Diwas Atreya 89 Jan 2, 2023
Discord-Bot - You can use the discord bot codes that are updated in every video of the codes I use in the discord bot making series that I have published on my youtube channel.

Discord-Bot You can use the discord bot codes that are updated in every video of the codes I use in the discord bot making series that I have publishe

Umut Bayraktar 114 Jan 3, 2023
Ini Adalah Tools Bot WhatsApp,Pengodean Ulang Dari Sc Bot Kanna Bot

Node Modules Belum Selesai Unduh File Bot Lengkap Node Modules Click Here Lord Bot FOR DEPLOY HEROKU USER Instal Buildpack heroku/nodejs https://githu

Creator Lord-Botz 8 Jul 1, 2022
This bot can raise your mood. This bot send joke often our channel for users. Sometimes bot don't work because we have not server for this project...)

Hi, welcome to send-joke-bot telegram bot project ?? What can do this bot ? This bot can raise your mood. This bot send joke often our channel for use

Muhammadamin 5 Sep 26, 2022
A Chrome extension to help you inspect Mp4 video content and find irregularities in video streams.

MP4Inspector A Chrome extension to help you inspect Mp4 video content and find irregularities in video streams. Installation In chrome navigate to chr

Bitmovin 48 Nov 28, 2022
This script produce the video scroll effect that we can find on the Apple Website's

Scrollable Sequence Description This script produce the video scroll effect that we can find on the Apple Website's. This script is inspired from the

bpy 2 Jan 25, 2022
Automatically uploads a list of patrons to VRChat everytime a patron joins or leaves, without reuploading the world

Automatically uploads a list of patrons to VRChat everytime a patron joins or leaves, without reuploading the world. For use with Miner28/AvatarImageReader

Paul 10 Nov 13, 2022
Automatically stream lo-fi hiphop at system startup on the Lofipi

Lofipi-mpv This runs as a system service on Raspberry Pi inside my "lofipi" speaker to automatically stream music from YouTube playlists on startup. F

Nicholas Sherlock 38 Nov 15, 2022
A bot Similar to the reaction roles discord bot, but free. Written in JavaScript, and uses MongoDB.

Discord Reaction Roles bot About ‱ Features ‱ Installation ‱ Setting Up About An open source reaction roles bot to anyone who needs one in their serve

null 52 Dec 22, 2022
Gitlift Discord Bot is a discord bot which is listening Discord Messages to reply with user gitlift profile and total contributions.

Remoklify - Gitlift Discord Bot Gitlift Discord Bot is a discord bot which is listening Discord Messages to reply with user gitlift profile and total

Remoklify 3 Mar 20, 2022
Vio-MD is multi-device whatsapp bot using library @adiwajshing/baileys and example bot of Violetics API

Vio Multi Device WhatsApp Bot Use at your own risk! Build with Baileys and JavaScript's native Map class ( as a command handler ), using https://viole

Violetics 4 May 31, 2022
Pre-Configured list of Templates and Approval/Denial Reasons that is free for any Bot List or Bot List Staff to use!

Infinity Cheat Sheet Pre-Configured list of templates that any Bot List or Bot List Staff are free to use! Website Preview Contributing I tried to mak

InfinityBotList 5 Jul 28, 2022
This project was created to help discord.js developers start their own bot, you can take this project as a basic for your bot and add things to it as you want. 🙂

Discord.js Starter-Bot A small & basic discord.js bot to help you get started ?? This project was created to help discord.js developers start their o

Strike 3 Nov 29, 2022