Admin Directory API . tokens

Instance Methods

delete(userKey, clientId)

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

get(userKey, clientId)

Get information about an access token issued by a user.

list(userKey)

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

Method Details

delete(userKey, clientId)
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)
get(userKey, clientId)
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)

Returns:
  An object of the form:

    { # JSON template for token resource in Directory API.
    "scopes": [ # A list of authorization scopes the application is granted.
      "A String",
    ],
    "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.
    "clientId": "A String", # The Client ID of the application the token is issued to.
    "etag": "A String", # ETag of the resource.
    "displayText": "A String", # The displayable name of the application the token is issued to.
    "anonymous": True or False, # Whether the application is registered with Google. The value is true if the application has an anonymous Client ID.
    "userKey": "A String", # The unique ID of the user that issued the token.
  }
list(userKey)
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)

Returns:
  An object of the form:

    { # JSON response template for List tokens operation in Directory API.
    "items": [ # A list of Token resources.
      { # JSON template for token resource in Directory API.
        "scopes": [ # A list of authorization scopes the application is granted.
          "A String",
        ],
        "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.
        "clientId": "A String", # The Client ID of the application the token is issued to.
        "etag": "A String", # ETag of the resource.
        "displayText": "A String", # The displayable name of the application the token is issued to.
        "anonymous": True or False, # Whether the application is registered with Google. The value is true if the application has an anonymous Client ID.
        "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.
    "etag": "A String", # ETag of the resource.
  }