您好我想从REST客户端推通知Android应用程序。我做像下面 -
Hi I am trying to push the notification from rest client to android app. I am doing like below -
URL - https://android.googleapis.com/gcm/send
Method - POST
Headers - Authorization: my_server_key
我总是得到这个消息
I always get this message
状态code:401未授权 复用协议:443:QUIC,P = 0.002 缓存控制:私人,最大年龄= 0
Status Code: 401 Unauthorized Alternate-Protocol: 443:quic,p=0.002 Cache-Control: private, max-age=0
我不知道我失踪&安培;最后我用正确的服务器API密钥。
I am not sure what I am missing & last I am using correct server api key.
请协助和放大器;先谢谢了。
Please assist & thanks in advance.
我在标题中设置这个值,那么它是为我工作的罚款。
I set this values in the header then it is working fine for me.
下面是标头键和放大器;值。
Below is the header key & value.
A)授权:放大器;它的价值关键喜欢API_KEY =
A) Authorization: & it value likes key=API_KEY
B)内容类型:应用程序/ JSON
B) Content-Type: application/json