1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
7 "namespace": "instanceID",
8 "description": "Use <code>chrome.instanceID</code> to access the Instance ID service.",
13 "description": "Retrieves an identifier for the app instance. The instance ID will be returned by the <code>callback</code>. The same ID will be returned as long as the application identity has not been revoked or expired.",
18 "description": "Function called when the retrieval completes. It should check $(ref:runtime.lastError) for error when instanceID is empty.",
23 "description": "An Instance ID assigned to the app instance."
30 "name": "getCreationTime",
32 "description": "Retrieves the time when the InstanceID has been generated. The creation time will be returned by the <code>callback</code>.",
37 "description": "Function called when the retrieval completes. It should check $(ref:runtime.lastError) for error when creationTime is zero.",
40 "name": "creationTime",
42 "description": "The time when the Instance ID has been generated, represented in milliseconds since the epoch."
51 "description": "Return a token that allows the authorized entity to access the service defined by scope.",
54 "name": "getTokenParams",
56 "description": "Parameters for getToken.",
61 "description": "Identifies the entity that is authorized to access resources associated with this Instance ID. It can be a project ID from <a href='https://code.google.com/apis/console'>Google developer console</a>."
66 "description": "Identifies authorized actions that the authorized entity can take. E.g. for sending GCM messages, <code>GCM</code> scope should be used."
71 "additionalProperties": {
76 "description": "Allows including a small number of string key/value pairs that will be associated with the token and may be used in processing the request."
83 "description": "Function called when the retrieval completes. It should check $(ref:runtime.lastError) for error when token is empty.",
88 "description": "A token assigned by the requested service."
95 "name": "deleteToken",
97 "description": "Revokes a granted token.",
100 "name": "deleteTokenParams",
102 "description": "Parameters for deleteToken.",
104 "authorizedEntity": {
107 "description": "The authorized entity that is used to obtain the token."
112 "description": "The scope that is used to obtain the token."
119 "description": "Function called when the token deletion completes. The token was revoked successfully if $(ref:runtime.lastError) is not set.",
127 "description": "Resets the app instance identifier and revokes all tokens associated with it.",
132 "description": "Function called when the deletion completes. The instance identifier was revoked successfully if $(ref:runtime.lastError) is not set.",
140 "name": "onTokenRefresh",
142 "description": "Fired when all the granted tokens need to be refreshed."