Admin SDK . tokens

Instance Methods

close()

Close httplib2 connections.

delete(userKey, clientId, x__xgafv=None)

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

get(userKey, clientId, x__xgafv=None)

Get 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)
Delete 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)
Get 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. STEPLADDER: Generated unstable field number for field 'kind'. (See http://go/stepladder-help#fieldNumber) STEPLADDER: Generated unstable field number for field 'etag'. (See http://go/stepladder-help#fieldNumber)
    "displayText": "A String", # The displayable name of the application the token is issued to.
    "userKey": "A String", # The unique ID of the user that issued the token.
    "scopes": [ # A list of authorization scopes the application is granted.
      "A String",
    ],
    "clientId": "A String", # The Client ID of the application the token is issued to.
    "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.
    "kind": "admin#directory#token", # The type of the API resource. This is always admin#directory#token.
    "etag": "A String", # ETag of the resource.
    "anonymous": True or False, # Whether the application is registered with Google. The value is true if the application has an anonymous Client ID.
  }
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. STEPLADDER: Generated unstable field number for field 'kind'. (See http://go/stepladder-help#fieldNumber) STEPLADDER: Generated unstable field number for field 'etag'. (See http://go/stepladder-help#fieldNumber)
    "kind": "admin#directory#tokenList", # The type of the API resource. This is always admin#directory#tokenList.
    "items": [ # A list of Token resources.
      { # JSON template for token resource in Directory API. STEPLADDER: Generated unstable field number for field 'kind'. (See http://go/stepladder-help#fieldNumber) STEPLADDER: Generated unstable field number for field 'etag'. (See http://go/stepladder-help#fieldNumber)
        "displayText": "A String", # The displayable name of the application the token is issued to.
        "userKey": "A String", # The unique ID of the user that issued the token.
        "scopes": [ # A list of authorization scopes the application is granted.
          "A String",
        ],
        "clientId": "A String", # The Client ID of the application the token is issued to.
        "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.
        "kind": "admin#directory#token", # The type of the API resource. This is always admin#directory#token.
        "etag": "A String", # ETag of the resource.
        "anonymous": True or False, # Whether the application is registered with Google. The value is true if the application has an anonymous Client ID.
      },
    ],
    "etag": "A String", # ETag of the resource.
  }