Google Cloud Messaging, returning 401 Unauthorized
问题 I followed the example on https://developer.android.com/google/gcm/notifications.html#gen-client trying to create notification key from client. getAccounts() method did return a valid google account. GoogleAuthUtil.getToken(context, accountname, scope) also returns a valid scope string. However the response from the post on https://android.googleapis.com/gcm/googlenotification is 401, and is an html page: <HTML> <HEAD> <TITLE>Unauthorized</TITLE> </HEAD> <BODY BGCOLOR="#FFFFFF" TEXT="#000000"