Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
ikea-check-script

Run using something like:

while sleep 300; do ikeacheck.sh;done

to run a check every 5 minutes. The script notifies you via notify-send. and puts a timestamp in ~/tmp/ikea.txt.

The curl command is stripped for reference here. To get the exact command, fill the PIN code form at the bottom of your shopping bag, open network tools, and capture the request made to /clickandcollect/in/receive/. Right click and "Copy-to-curl" on that request.

Once this succeeds, your account is added to the list, and if you open your browser sesssion again, you should'nt get the 818 error.

Make sure you change the --data-raw argument to yours.

#!/bin/bash
RESPONSE=$(curl --silent 'https://ww8.ikea.com/clickandcollect/in/receive/' -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:89.0) Gecko/20100101 Firefox/89.0' -H 'Accept: */*' -H 'Accept-Language: en-US,en;q=0.5' --compressed -H 'content-type: application/x-www-form-urlencoded' -H 'Origin: https://order.ikea.com' -H 'DNT: 1' -H 'Connection: keep-alive' -H 'TE: Trailers' --data-raw 'payload={"selectedService":"zip","selectedServiceValue":"PIN","slId":"abcedf","articles":[],"locale":"en_IN","customerView":"desktop"}&backUrl=https://order.ikea.com/in/en/checkout/shoppinglist/&hmac=something' | jq -r '.status')
if [ "$RESPONSE" != "ERROR" ]; then
notify-send "ikea is go"
echo "$(date) IKEA TIME" >> ~/tmp/ikea.txt
else
echo "$(date) Failed"
exit 1
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment