Skip to content

Instantly share code, notes, and snippets.

What would you like to do?

Run using something like:

while sleep 300; do;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.

RESPONSE=$(curl --silent '' -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:' -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=' | jq -r '.status')
if [ "$RESPONSE" != "ERROR" ]; then
notify-send "ikea is go"
echo "$(date) IKEA TIME" >> ~/tmp/ikea.txt
echo "$(date) Failed"
exit 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment