I\'m trying to send a message to an Android phone but keep getting response code 401 with text: Unauthorized. Also I keep reading different stories on what key to use, I kno
You could do your headers like this just to make it a little easier to read and eliminate the concatenation:
$headers = array( "Authorization:key=mykey", "Content-Type:application/json", );