ATTENTION!
This script is obsolete due to the fact that Telia has taken action against this script, therefore it will not function correctly anymore.
- API will respond with HTTP 200 and empty body if the
user-agent
header containsnode-fetch
. - HTTP 403 is returned when IP is blacklisted.
These restrictions can easily be overcome. But I will NOT provide any public workarounds.
Let's give normal people some fighting chance to get their PS5 next time it's back in Telia's stock. Peace!
This script is looking for Playstation 5 consoles from Telia's e-shop via their API.
This script is using Messente's SMS API for delivering SMS notifications.
Also e-mail notifications can be set up just by providing proper Gmail credentials and e-mail recipients.
To set this script up you need to provide API username and password and an array of phone numbers you want to send the notification to. Please do so in the index.js file header.
It's up to you how you deploy this script.
I for example set it up as a cronjob in my Zone virtual server.
- Install NodeJS with NPM. https://nodejs.org/en/download/
- Download this code (at least
index.js
&package.json
). - Set up your Messente account and get your API credentials. You should get 1€ free credit as well. https://dashboard.messente.com/register
- Update credentials and e-mail/SMS recipients in the code.
- To install script dependencies run
npm install
. - To run this script run
npm start
. - Repeat step 6. You can schedule a repeating task in Windows task scheduler, set up a cronjob, modify this script to run in a loop. You pick what suits best for your needs or technical skills.
This script has already paid off.
Got notifications as soon as PS5 was back in stock in Telia's e-shop at 2021-02-08 16:45:01
and 2021-03-08 18:05:00
(notice a pattern there?).
Was one of the first who was able to make a purchase.
Minutes later PS5 was sold out again. Got lucky!
Feel free to use and modify this script in any way as you wish.
That said, I can't be hold responsible for your sadness, happiness or whatnot this script may or may not cause to you.