Skip to content

Latest commit

 

History

115 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Pass für alle

A Tampermonkey userscript that helps search for available passport or national ID card appointments in the Swedish Police's current booking service.

The script does not sign in for you and does not handle BankID. You sign in at the Police website yourself, choose the number of applicants and passport offices, and then let the script keep searching until it finds an available appointment within your configured date range.

If the script stops working, check for updates. The Police may have changed their booking service again.

My site about Pass für alle (in Swedish).

Install

  • Install Tampermonkey in your browser.
  • Download the code, easiest by clicking Download ZIP.
  • Extract the zip file.
  • Click the Tampermonkey icon and choose Create a new script.
  • Open pass-fur-alle.js in a plain text editor.
  • Copy all code from pass-fur-alle.js and paste it into the Tampermonkey editor, replacing whatever is already there.
  • Change the date settings if needed, see Settings.
  • Save the script.

Settings

The settings are near the top of pass-fur-alle.js:

// Change dates here:
var dateFrom = today();
var dateTo = '2027-12-24';

// Constants
var searchRetryDelayMs = 1;

First accepted date

By default, the script accepts appointments from today:

var dateFrom = today();

To start from another date, use the YYYY-MM-DD format:

var dateFrom = '2026-08-24';

Last accepted date

dateTo is the last date the script may accept:

var dateTo = '2027-12-24';

If the booking page moves past dateTo, the script goes back to the search step and searches again.

Delay between searches

searchRetryDelayMs controls how long the script waits between attempts, in milliseconds:

var searchRetryDelayMs = 1;

Example: 3000 means 3 seconds.

Run the damn thing

  • Go to the Police booking service for passports and national ID cards: etjanster.polisen.se/etidsbokning/passnid/boka/sok.
  • Sign in with BankID.
  • On step 1, choose the number of applicants and whether everyone lives in Sweden.
  • Choose one or more passport offices in the Police website's own field. The Police allows up to 4 locations.
  • Click the script's Sök tid mellan ... button.
  • The script searches for appointments between dateFrom and dateTo.
  • When an appointment is found, the script selects it, plays a sound, and stops.
  • If no appointment is found, the script keeps searching.

You can stop the search with Avbryt in the script's loading overlay. On step 2, it uses the Police website's own back function to return to the search step.

About

Since Polisens web queueing solution for getting a passport sucks, and it is more or less impossible to book a time, I wrote this small javascript. What it does is that it automates the searching for a bookable time. In the file you just change the constants to your information and away you go. :)

Topics

Resources

Stars

367 stars

Watchers

23 watching

Forks

Releases

Packages

Contributors

Languages