Admin SDK API . tokens

Instance Methods

close()

Close httplib2 connections.

delete(userKey, clientId, x__xgafv=None)

Deletes all access tokens issued by a user for an application.

get(userKey, clientId, x__xgafv=None)

Gets information about an access token issued by a user.

list(userKey, x__xgafv=None)

Returns the set of tokens specified user has issued to 3rd party applications.

Method Details

close()
Close httplib2 connections.
delete(userKey, clientId, x__xgafv=None)
Deletes all access tokens issued by a user for an application.

Args:
  userKey: string, Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID. (required)
  clientId: string, The Client ID of the application the token is issued to. (required)
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format
get(userKey, clientId, x__xgafv=None)
Gets information about an access token issued by a user.

Args:
  userKey: string, Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID. (required)
  clientId: string, The Client ID of the application the token is issued to. (required)
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # JSON template for token resource in Directory API.
  "anonymous": True or False, # Whether the application is registered with Google. The value is `true` if the application has an anonymous Client ID.
  "clientId": "A String", # The Client ID of the application the token is issued to.
  "displayText": "A String", # The displayable name of the application the token is issued to.
  "etag": "A String", # ETag of the resource.
  "kind": "admin#directory#token", # The type of the API resource. This is always `admin#directory#token`.
  "nativeApp": True or False, # Whether the token is issued to an installed application. The value is `true` if the application is installed to a desktop or mobile device.
  "scopes": [ # A list of authorization scopes the application is granted.
    "A String",
  ],
  "userKey": "A String", # The unique ID of the user that issued the token.
}
list(userKey, x__xgafv=None)
Returns the set of tokens specified user has issued to 3rd party applications.

Args:
  userKey: string, Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID. (required)
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # JSON response template for List tokens operation in Directory API.
  "etag": "A String", # ETag of the resource.
  "items": [ # A list of Token resources.
    { # JSON template for token resource in Directory API.
      "anonymous": True or False, # Whether the application is registered with Google. The value is `true` if the application has an anonymous Client ID.
      "clientId": "A String", # The Client ID of the application the token is issued to.
      "displayText": "A String", # The displayable name of the application the token is issued to.
      "etag": "A String", # ETag of the resource.
      "kind": "admin#directory#token", # The type of the API resource. This is always `admin#directory#token`.
      "nativeApp": True or False, # Whether the token is issued to an installed application. The value is `true` if the application is installed to a desktop or mobile device.
      "scopes": [ # A list of authorization scopes the application is granted.
        "A String",
      ],
      "userKey": "A String", # The unique ID of the user that issued the token.
    },
  ],
  "kind": "admin#directory#tokenList", # The type of the API resource. This is always `admin#directory#tokenList`.
}