Hi all,
Is there a way to check if the user logged in to ArcGIS Online or Portal in Python API
I have a script that publishes zipped shp files to my portal, but before publishing, I would like to check if I am logged in and authenticated to publish
for now, I am using gis.users.me which returns None if am not logged in, but looking for something different than this
<SPAN class="keyword token">from</SPAN> arcgis<SPAN class="punctuation token">.</SPAN>gis <SPAN class="keyword token">import</SPAN> GIS
gis <SPAN class="operator token">=</SPAN> GIS<SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN>
<SPAN class="keyword token">print</SPAN><SPAN class="punctuation token">(</SPAN>gis<SPAN class="punctuation token">.</SPAN>users<SPAN class="punctuation token">.</SPAN>me<SPAN class="punctuation token">)</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>
Thank you,
Ahmad