API Reference for GCM service
The Google Cloud Messaging for Chrome service sends messages to users of a Chrome App. The service handles all aspects of queueing and delivering messages. To use the service, you must agree to the Google Cloud Messaging for Chrome API Terms of Service.
Messages must conform to these constraints:
- Maximum payload length: 256 bytes
- Maximum subchannels: 4
- Maximum API requests per day: 10,000
Google API client libraries
You may use the REST interface defined here to access Google Cloud Messaging for Chrome from your application. We also offer Google API client libraries for a number of popular programming languages that can be used to access the API. For more information, see Google APIs Client Libraries.
method sends a message to your app or extension user.
Authentication is required to send messages to users. Using OAuth 2.0 for Web Server Applications describes this in greater detail.
The URL used to obtain access to the GCM for Chrome service:
The required set of query string parameters are:
||Indicates the app or extension client that is making the request. Obtained from the Google APIs Console; the parameter value must exactly match the client ID shown in the console.|
||The client secret obtained during registration in Google APIs Console.|
||Token associated with app or extension used to obtain new access token.|
The authorization response includes:
||Valid token required to access the GCM for Chrome service.|
||Time until access token expires in seconds.|
||The returned token type,
In the request body, supply:
||The request body content type,
||The app or extension channel ID required to push messages back to the app or extension.|
||The subchannel to send the message on; only values 0-3 are valid.|
||The message body (up to 256 bytes). This should not include any personally identifiable information.|