API Update cronjob script

Thanks i read now all and add the headers but now i get Received status code ‘401’ from server

https://pastebin.com/43X9U2J5