GetSigninToken

サマリー

Returns token information when signed in to ArcGIS.com or a local portal.

説明

The GetSigninToken function will return the token and expiration information when signed in to a portal. If the application is not signed in, the function will return None. The token can be used by urllib calls to authenticate with ArcGIS.com services through REST.

構文

GetSigninToken ()
戻り値
データ タイプ説明
Dictionary

A dictionary of key value pairs for token, referer, expires, and messages.

コードのサンプル

GetSigninToken example

Get and print a token within the Python window.

import arcpy

token = arcpy.GetSigninToken()
if token is not None:
    print(token['token'])