Firstly, you'll need to use your web browser's network debug panel to intercept a login request to the access points web GUI.
You'll want to find the 'Basic admin' cookie.
That done, just replace both 'x.y.z.w' with your devices IP address, and put the key in 'PUT YOUR KEY HERE'.
The script requires the standard 'curl' command, and also the 'jq' command to understand the output. If you don't have them. they'll be in your standard repositories.