I\'m getting many 401 Unauthorized errors when trying to connect to Google Cloud Message Server.
Our code was working for some time on
I have solved my problem by creating new API Key under same project. Following this
Go to Google developer console then Select project Credentials -> Create Credentials -> API Key -> Server Key then add your server ip address where your GCM server code hosted.
After creating Api key it may takes 5 minutes to be workable