You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What steps will reproduce the problem?
1. Follow the instructions:
https://developer.android.com/google/gcm/notifications.html#gen-client
What is the expected output? What do you see instead?
Expect HTTP 200 response with notification_key value.
Instead get HTTP 401 Unauthorized response with an HTML body stating the same.
What version of the product are you using? On what operating system?
Google Play Services 6.5.87, Android 5.0.1.
Please provide any additional information below.
POSTing to https://android.googleapis.com/gcm/googlenotification.
Including header Content-Type: application/json; charset=UTF-8.
Including project_id header with project number from Google Developers Console.
Body contains:
- "operation":"add"
- a unique notification_key_name
- a single value for registration_ids that I just received from
GoogleCloudMessaging.register and can use to successfully send messages from
the server to the device
- valid id_token (I can verify it and get the payload on the server)
Can you specify in which cases the service will respond with HTTP 401
Unauthorized?
Original issue reported on code.google.com by pushbit on 9 Feb 2015 at 10:19
The text was updated successfully, but these errors were encountered:
what is the exact reason for respond 401 error when i am trying to push a
notification message to gcm server from third party server by using php script?
:-(
Original comment by ba...@technomobs.com on 13 Feb 2015 at 7:04
ba...@technomobs.com, I would guess that either you are not using a valid "Key
for server applications" or that key has restricted "allowed IPs". This issue
is only for the method of generating a notification key on Android devices
using a Google auth token, as described in the instructions linked above.
Original comment by pushbit on 13 Feb 2015 at 9:50
Original issue reported on code.google.com by
pushbit
on 9 Feb 2015 at 10:19The text was updated successfully, but these errors were encountered: