GCM sending with curl (php)

前端 未结 2 1958
无人及你
无人及你 2020-12-10 22:52

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

2条回答
  •  有刺的猬
    2020-12-10 23:24

    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",
    );
    

提交回复
热议问题