Thanks ever so much for the reply -
This has been very frustrating.
Been trying to learn and troubleshoot this but I'm still a little lost -
1 - I don't see where are we adding the function data in the array? $method is the function
2 - It was my understanding that the php script was Adding the access-token so we wouldn't need to have it viewable in the html.
Have been working with example from this thread
From looking at an online html debugger console, I can see the array is never being sent, just the main line with function name and device ID