Reputation: 61
I'm dealing with Eclipse Luna to build the web app (jsp,java) while dealing with Eclipse Juno to build the android app. Plus, i'm referring to this link as my tutorial http://javapapers.com/android/google-cloud-messaging-gcm-for-android-and-push-notifications/
Registration id generated successfully in android device. But when run Java Application it gives following error.
RegId required: com.google.android.gcm.server.InvalidRequestException: HTTP Status Code: 401
What do I have to do?
Upvotes: 0
Views: 1068
Reputation: 1388
Check if your IP address is correctly listed in the list of "allowed IPs" for your particular server key in the Google API console.
To obtain your IP follow the link: http://www.ipcow.com/
To check the allowed list of IPs:
Note: If you leave the list of allowed IPs blank, any IP is allowed. But try it using your current IP (worked for me).
Upvotes: 0