ncssar / sartopo_python

Python calls for the caltopo / sartopo API
GNU General Public License v3.0
14 stars 2 forks source link

new map request to caltopo.com is returning 401 - Authentication Required #75

Open caver456 opened 1 week ago

caver456 commented 1 week ago

Not sure what changed:

PS C:\Users\caver\Documents\GitHub\sartopo_python\sartopo_python> python test.py
09:09:12 [sartopo_python:1041:INFO] SENDING POST to 'https://caltopo.com/api/v1/acct/11UEE9/CollaborativeMap':
09:09:12 [sartopo_python:1042:INFO] {
   "json": "{\"properties\": {\"mapConfig\": \"{\\\"activeLayers\\\": [[\\\"mbt\\\", 1]]}\", \"cfgLocked\": true, \"title\": \"NewMap\", \"mode\": \"cal\"}, \"state\": {\"type\": \"FeatureCollection\", \"features\": [{\"geometry\": {\"coordinates\": [-120, 39, 0, 0], \"type\": \"Point\"}, \"id\": \"11111111-1111-1111-1111-111111111111\", \"type\": \"Feature\", \"properties\": {\"creator\": \"11UEE9\", \"title\": \"NewMapDummyMarker\", \"class\": \"Marker\"}}]}}",
   "id": ".....",
   "expires": 1718986272888,
   "signature": "....."
}
09:09:12 [sartopo_python:1045:INFO] {'json': '{"properties": {"mapConfig": "{\\"activeLayers\\": [[\\"mbt\\", 1]]}", "cfgLocked": true, "title": "NewMap", "mode": "cal"}, "state": {"type": "FeatureCollection", "features": [{"geometry": {"coordinates": [-120, 39, 0, 0], "type": "Point"}, "id": "11111111-1111-1111-1111-111111111111", "type": "Feature", "properties": {"creator": "11UEE9", "title": "NewMapDummyMarker", "class": "Marker"}}]}}', 'id': '.....', 'expires': 1718986272888, 'signature': '.....'}
09:09:13 [sartopo_python:1096:INFO] response code = 401
09:09:13 [sartopo_python:1124:ERROR] New map request failed:401:{"code":401,"message":"Authentication required","status":"error","timestamp":1718986153477}
09:09:13 [sartopo_python:291:INFO] New map request failed.  See the log for details.
09:09:13 [sartopo_python:2880:CRITICAL] Uncaught exception:
Traceback (most recent call last):
  File "C:\Users\caver\Documents\GitHub\sartopo_python\sartopo_python\test.py", line 6, in <module>
    sts=SartopoSession('caltopo.com',
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\caver\Documents\GitHub\sartopo_python\sartopo_python\sartopo_python.py", line 226, in __init__
    raise STSException
sartopo_python.STSException
09:09:13 [sartopo_python:878:INFO] SartopoSession instance deleted for map [NEW].
caver456 commented 1 week ago

Tried with the code at commit d814e38, Dec 2022, latest from plans console work - which was the first appearance of [NEW]. Still no go:

PS C:\Users\caver\Documents\GitHub\sartopo_python-d814e382986c80c58cb148215e8444d52ae8265f\sartopo_python> python test.py
06:36:33 [sartopo_python:781:WARNING] A request is about to be sent to the internet, but accountIdInternet was not specified.  The request will use accountId, but will fail if that ID does not have valid permissions at the internet host.
06:36:33 [sartopo_python:791:INFO] sending post to https://caltopo.com/api/v0/userdata
06:36:33 [sartopo_python:817:INFO] {'json': '{"map": {"center": [-120, 39], "zoom": 13}}', 'id': '.....', 'expires': 1719063513580, 'signature': '.....'}
06:36:34 [sartopo_python:781:WARNING] A request is about to be sent to the internet, but accountIdInternet was not specified.  The request will use accountId, but will fail if that ID does not have valid permissions at the internet host.
06:36:34 [sartopo_python:791:INFO] sending post to https://caltopo.com/api/v1/acct/11UEE9/CollaborativeMap
06:36:34 [sartopo_python:817:INFO] {'json': '{"properties": {"mapConfig": "{\\"activeLayers\\": [[\\"mbt\\", 1]]}", "cfgLocked": true, "title": "new", "mode": "sar"}, "state": {"type": "FeatureCollection", "features": [{"geometry": {"coordinates": [-120, 39, 0, 0], "type": "Point"}, "id": "11111111-1111-1111-1111-111111111111", "type": "Feature", "properties": {"creator": "11UEE9", "title": "NewMapDummyMarker", "class": "Marker"}}]}}', 'id': '.....', 'expires': 1719063514290, 'signature': '.....'}
06:36:34 [sartopo_python:852:INFO] response code = 401
06:36:34 [sartopo_python:880:ERROR] New map request failed:401:{"code":401,"message":"Authentication required","status":"error","timestamp":1719063393348}
06:36:34 [sartopo_python:417:INFO] New map request failed.  See the log for details.
06:36:34 [sartopo_python:2421:CRITICAL] Uncaught exception:
Traceback (most recent call last):
  File "C:\Users\caver\Documents\GitHub\sartopo_python-d814e382986c80c58cb148215e8444d52ae8265f\sartopo_python\test.py", line 6, in <module>
    sts=SartopoSession('caltopo.com',
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\caver\Documents\GitHub\sartopo_python-d814e382986c80c58cb148215e8444d52ae8265f\sartopo_python\sartopo_python.py", line 218, in __init__
    raise STSException
sartopo_python.STSException
06:36:34 [sartopo_python:677:INFO] SartopoSession instance deleted for map [NEW].
06:36:34 [sartopo_python:691:INFO] Sartopo sync terminating for map [NEW].
caver456 commented 1 week ago

Here's the latest request sequence in chrome devtools when saving a new map, though notes point out that fiddler is needed to see the responses:

image

image

image

image

image

CollaborativeMap payload:

image

caver456 commented 1 week ago

The current code does work on CTD 4232 (11/30/22):

PS C:\Users\caver\Documents\GitHub\sartopo_python\sartopo_python> python test.py
14:58:48 [sartopo_python:370:WARNING] account entry 'caver456@gmail.com' in config file '../../sts.ini' does not specify 'accountIdInternet': if a different accountId is required for caltopo.com/saratopo.com vs. for CalTopo Desktop, you will not be able to send PDF generation jobs to the internet from this session.
14:58:48 [sartopo_python:1055:INFO] SENDING POST to 'http://localhost:8080/api/v1/acct/11UEE9/CollaborativeMap':
14:58:48 [sartopo_python:1056:INFO] {
   "json": "{\"properties\": {\"mapConfig\": \"{\\\"activeLayers\\\": [[\\\"mbt\\\", 1]]}\", \"cfgLocked\": true, \"title\": \"NewMap\", \"mode\": \"cal\"}, \"state\": {\"type\": \"FeatureCollection\", \"features\": [{\"geometry\": {\"coordinates\": [-120, 39, 0, 0], \"type\": \"Point\"}, \"id\": \"11111111-1111-1111-1111-111111111111\", \"type\": \"Feature\", \"properties\": {\"creator\": \"11UEE9\", \"title\": \"NewMapDummyMarker\", \"class\": \"Marker\"}}]}}"
}
14:58:48 [sartopo_python:1059:INFO] {'properties': {'mapConfig': '{"activeLayers": [["mbt", 1]]}', 'cfgLocked': True, 'title': 'NewMap', 'mode': 'cal'}, 'state': {'type': 'FeatureCollection', 'features': [{'geometry': {'coordinates': [-120, 39, 0, 0], 'type': 'Point'}, 'id': '11111111-1111-1111-1111-111111111111', 'type': 'Feature', 'properties': {'creator': '11UEE9', 'title': 'NewMapDummyMarker', 'class': 'Marker'}}]}}
14:58:49 [sartopo_python:1130:INFO] New map URL:JLL
14:58:49 [sartopo_python:1055:INFO] SENDING POST to 'http://localhost:8080/api/v0/userdata':
14:58:49 [sartopo_python:1056:INFO] {
   "json": "{\"map\": {\"center\": [-120, 39], \"zoom\": 13}}"
}
14:58:49 [sartopo_python:1059:INFO] {'map': {'center': [-120, 39], 'zoom': 13}}
14:58:51 [sartopo_python:1098:INFO] SENDING DELETE to 'http://localhost:8080/api/v1/map/JLL/Marker/11111111-1111-1111-1111-111111111111'
14:58:52 [sartopo_python:317:INFO] Initial cache population begins.
14:58:52 [sartopo_python:1081:INFO] SENDING GET to 'http://localhost:8080/api/v1/map/JLL/since/0'
14:58:52 [sartopo_python:698:INFO]   Updating "ids"
14:58:52 [sartopo_python:319:INFO] Initial cache population complete.
14:58:52 [sartopo_python:937:INFO] This is the first sync attempt; pausing for the normal sync interval before starting sync.
14:58:52 [sartopo_python:905:INFO] Sartopo syncing initiated for map JLL.
14:58:57 [sartopo_python:1081:INFO] SENDING GET to 'http://localhost:8080/api/v1/map/JLL/since/1719093531999'
14:58:57 [sartopo_python:837:INFO] Main thread has ended; sync is stopping...
14:58:57 [sartopo_python:892:INFO] SartopoSession instance deleted for map JLL.
PS C:\Users\caver\Documents\GitHub\sartopo_python\sartopo_python>

changing the test code domainAndPort from localhost:8080 to caltopo.com, but not changing anything in sartopo_python.py, still shows the issue:

PS C:\Users\caver\Documents\GitHub\sartopo_python\sartopo_python> python test.py
15:03:18 [sartopo_python:1055:INFO] SENDING POST to 'https://caltopo.com/api/v1/acct/11UEE9/CollaborativeMap':
15:03:18 [sartopo_python:1056:INFO] {
   "json": "{\"properties\": {\"mapConfig\": \"{\\\"activeLayers\\\": [[\\\"mbt\\\", 1]]}\", \"cfgLocked\": true, \"title\": \"NewMap\", \"mode\": \"cal\"}, \"state\": {\"type\": \"FeatureCollection\", \"features\": [{\"geometry\": {\"coordinates\": [-120, 39, 0, 0], \"type\": \"Point\"}, \"id\": \"11111111-1111-1111-1111-111111111111\", \"type\": \"Feature\", \"properties\": {\"creator\": \"11UEE9\", \"title\": \"NewMapDummyMarker\", \"class\": \"Marker\"}}]}}",
   "id": ".....",
   "expires": 1719093918750,
   "signature": "....."
}
15:03:18 [sartopo_python:1059:INFO] {'json': '{"properties": {"mapConfig": "{\\"activeLayers\\": [[\\"mbt\\", 1]]}", "cfgLocked": true, "title": "NewMap", "mode": "cal"}, "state": {"type": "FeatureCollection", "features": [{"geometry": {"coordinates": [-120, 39, 0, 0], "type": "Point"}, "id": "11111111-1111-1111-1111-111111111111", "type": "Feature", "properties": {"creator": "11UEE9", "title": "NewMapDummyMarker", "class": "Marker"}}]}}', 'id': '.....', 'expires': 1719093918750, 'signature': '.....'}
15:03:19 [sartopo_python:1110:INFO] response code = 401
15:03:19 [sartopo_python:1138:ERROR] New map request failed:401:{"code":401,"message":"Authentication required","status":"error","timestamp":1719093798967}
15:03:19 [sartopo_python:305:INFO] New map request failed.  See the log for details.
15:03:19 [sartopo_python:2894:CRITICAL] Uncaught exception:
Traceback (most recent call last):
  File "C:\Users\caver\Documents\GitHub\sartopo_python\sartopo_python\test.py", line 6, in <module>
    sts=SartopoSession('caltopo.com',
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\caver\Documents\GitHub\sartopo_python\sartopo_python\sartopo_python.py", line 226, in __init__
    raise STSException
sartopo_python.STSException
15:03:19 [sartopo_python:892:INFO] SartopoSession instance deleted for map [NEW].
PS C:\Users\caver\Documents\GitHub\sartopo_python\sartopo_python>
caver456 commented 1 week ago

Also works on the latest CTD 4240 - interesting that it the new map has a 3-character map ID:

PS C:\Users\caver\Documents\GitHub\sartopo_python\sartopo_python> python test.py
15:20:04 [sartopo_python:370:WARNING] account entry 'caver456@gmail.com' in config file '../../sts.ini' does not specify 'accountIdInternet': if a different accountId is required for caltopo.com/saratopo.com vs. for CalTopo Desktop, you will not be able to send PDF generation jobs to the internet from this session.
15:20:04 [sartopo_python:1055:INFO] SENDING POST to 'http://localhost:8080/api/v1/acct/11UEE9/CollaborativeMap':
15:20:04 [sartopo_python:1056:INFO] {
   "json": "{\"properties\": {\"mapConfig\": \"{\\\"activeLayers\\\": [[\\\"mbt\\\", 1]]}\", \"cfgLocked\": true, \"title\": \"new4240\", \"mode\": \"cal\"}, \"state\": {\"type\": \"FeatureCollection\", \"features\": [{\"geometry\": {\"coordinates\": [-120, 39, 0, 0], \"type\": \"Point\"}, \"id\": \"11111111-1111-1111-1111-111111111111\", \"type\": \"Feature\", \"properties\": {\"creator\": \"11UEE9\", \"title\": \"NewMapDummyMarker\", \"class\": \"Marker\"}}]}}"
}
15:20:04 [sartopo_python:1059:INFO] {'properties': {'mapConfig': '{"activeLayers": [["mbt", 1]]}', 'cfgLocked': True, 'title': 'new4240', 'mode': 'cal'}, 'state': {'type': 'FeatureCollection', 'features': [{'geometry': {'coordinates': [-120, 39, 0, 0], 'type': 'Point'}, 'id': '11111111-1111-1111-1111-111111111111', 'type': 'Feature', 'properties': {'creator': '11UEE9', 'title': 'NewMapDummyMarker', 'class': 'Marker'}}]}}
15:20:04 [sartopo_python:1130:INFO] New map URL:11E
15:20:04 [sartopo_python:1055:INFO] SENDING POST to 'http://localhost:8080/api/v0/userdata':
15:20:04 [sartopo_python:1056:INFO] {
   "json": "{\"map\": {\"center\": [-120, 39], \"zoom\": 13}}"
}
15:20:04 [sartopo_python:1059:INFO] {'map': {'center': [-120, 39], 'zoom': 13}}
15:20:05 [sartopo_python:1098:INFO] SENDING DELETE to 'http://localhost:8080/api/v1/map/11E/Marker/11111111-1111-1111-1111-111111111111'
15:20:06 [sartopo_python:317:INFO] Initial cache population begins.
15:20:06 [sartopo_python:1081:INFO] SENDING GET to 'http://localhost:8080/api/v1/map/11E/since/0'
15:20:06 [sartopo_python:698:INFO]   Updating "ids"
15:20:06 [sartopo_python:319:INFO] Initial cache population complete.
15:20:06 [sartopo_python:937:INFO] This is the first sync attempt; pausing for the normal sync interval before starting sync.
15:20:06 [sartopo_python:905:INFO] Sartopo syncing initiated for map 11E.
15:20:11 [sartopo_python:1081:INFO] SENDING GET to 'http://localhost:8080/api/v1/map/11E/since/1719094805617'
15:20:11 [sartopo_python:698:INFO]   Updating "ids"
15:20:11 [sartopo_python:837:INFO] Main thread has ended; sync is stopping...
15:20:11 [sartopo_python:892:INFO] SartopoSession instance deleted for map 11E.
PS C:\Users\caver\Documents\GitHub\sartopo_python\sartopo_python>
caver456 commented 1 week ago

Tried to create new map immediately after successful feature creation requests in a different session, just to rule out the possibility of too-many-invalid-request-throttling. No apparent correlation - the features were created successfully in CA4L4, and the same 401 'Authentication required' still shows up:

PS C:\Users\caver\Documents\GitHub\sartopo_python\sartopo_python> python test.py
20:45:49 [sartopo_python:317:INFO] Initial cache population begins.
20:45:50 [sartopo_python:1081:INFO] SENDING GET to 'https://caltopo.com/api/v1/map/CA4L4/since/0'
20:45:50 [sartopo_python:698:INFO]   Updating "ids"
20:45:50 [sartopo_python:702:INFO]   processing 1 feature(s):['cb8ae010-1597-4381-8d47-6a60b389a45e']
20:45:50 [sartopo_python:319:INFO] Initial cache population complete.
20:45:50 [sartopo_python:937:INFO] This is the first sync attempt; pausing for the normal sync interval before starting sync.
20:45:50 [sartopo_python:905:INFO] Sartopo syncing initiated for map CA4L4.
20:45:50 [sartopo_python:1055:INFO] SENDING POST to 'https://caltopo.com/api/v1/map/CA4L4/Shape':
20:45:50 [sartopo_python:1056:INFO] {
   "json": "{\"properties\": {\"title\": \"a\", \"description\": \"\", \"stroke-width\": 2, \"stroke-opacity\": 1, \"stroke\": \"#FF0000\", \"fill\": \"#FF0000\", \"fill-opacity\": 0.1, \"gpstype\": \"TRACK\"}, \"geometry\": {\"type\": \"Polygon\", \"coordinates\": [[[-120, 39], [-120.1, 39.1], [-120.1, 39]]]}}",
   "id": ".....",
   "expires": 1719287270628,
   "signature": "....."
}
20:45:50 [sartopo_python:1059:INFO] {'json': '{"properties": {"title": "a", "description": "", "stroke-width": 2, "stroke-opacity": 1, "stroke": "#FF0000", "fill": "#FF0000", "fill-opacity": 0.1, "gpstype": "TRACK"}, "geometry": {"type": "Polygon", "coordinates": [[[-120, 39], [-120.1, 39.1], [-120.1, 39]]]}}', 'id': '.....', 'expires': 1719287270628, 'signature': '.....'}
20:45:50 [sartopo_python:1055:INFO] SENDING POST to 'https://caltopo.com/api/v1/map/CA4L4/Shape':
20:45:50 [sartopo_python:1056:INFO] {
   "json": "{\"properties\": {\"title\": \"b\", \"description\": \"\", \"stroke-width\": 2, \"stroke-opacity\": 1, \"stroke\": \"#FF0000\", \"fill\": \"#FF0000\", \"fill-opacity\": 0.1, \"gpstype\": \"TRACK\"}, \"geometry\": {\"type\": \"Polygon\", \"coordinates\": [[[39, -120.2], [39.1, -120.3], [39, -120.3]]]}}",
   "id": ".....",
   "expires": 1719287270676,
   "signature": "....."
}
20:45:50 [sartopo_python:1059:INFO] {'json': '{"properties": {"title": "b", "description": "", "stroke-width": 2, "stroke-opacity": 1, "stroke": "#FF0000", "fill": "#FF0000", "fill-opacity": 0.1, "gpstype": "TRACK"}, "geometry": {"type": "Polygon", "coordinates": [[[39, -120.2], [39.1, -120.3], [39, -120.3]]]}}', 'id': '.....', 'expires': 1719287270676, 'signature': '.....'}
20:45:55 [sartopo_python:1081:INFO] SENDING GET to 'https://caltopo.com/api/v1/map/CA4L4/since/1719287148676'
20:45:55 [sartopo_python:702:INFO]   processing 2 feature(s):['c76cac5f-6be1-4550-b3ba-eff6c5af6539', 'ea68e7c3-6e44-4059-975e-9dd07bbdbf34']
20:45:55 [sartopo_python:731:INFO]   response contained properties for Shape:a but they matched the cache, so no cache update or callback is performed
20:45:55 [sartopo_python:759:INFO]   response contained geometry for Shape:a but it matched the cache, so no cache update or callback is performed
20:45:55 [sartopo_python:731:INFO]   response contained properties for Shape:b but they matched the cache, so no cache update or callback is performed
20:45:55 [sartopo_python:759:INFO]   response contained geometry for Shape:b but it matched the cache, so no cache update or callback is performed
20:45:55 [sartopo_python:837:INFO] Main thread has ended; sync is stopping...
20:45:55 [sartopo_python:892:INFO] SartopoSession instance deleted for map CA4L4.
PS C:\Users\caver\Documents\GitHub\sartopo_python\sartopo_python> python test.py
20:46:32 [sartopo_python:1055:INFO] SENDING POST to 'https://caltopo.com/api/v1/acct/11UEE9/CollaborativeMap':
20:46:32 [sartopo_python:1056:INFO] {
   "json": "{\"properties\": {\"mapConfig\": \"{\\\"activeLayers\\\": [[\\\"mbt\\\", 1]]}\", \"cfgLocked\": true, \"title\": \"new4240\", \"mode\": \"cal\"}, \"state\": {\"type\": \"FeatureCollection\", \"features\": [{\"geometry\": {\"coordinates\": [-120, 39, 0, 0], \"type\": \"Point\"}, \"id\": \"11111111-1111-1111-1111-111111111111\", \"type\": \"Feature\", \"properties\": {\"creator\": \"11UEE9\", \"title\": \"NewMapDummyMarker\", \"class\": \"Marker\"}}]}}",
   "id": ".....",
   "expires": 1719287312817,
   "signature": "....."
}
20:46:32 [sartopo_python:1059:INFO] {'json': '{"properties": {"mapConfig": "{\\"activeLayers\\": [[\\"mbt\\", 1]]}", "cfgLocked": true, "title": "new4240", "mode": "cal"}, "state": {"type": "FeatureCollection", "features": [{"geometry": {"coordinates": [-120, 39, 0, 0], "type": "Point"}, "id": "11111111-1111-1111-1111-111111111111", "type": "Feature", "properties": {"creator": "11UEE9", "title": "NewMapDummyMarker", "class": "Marker"}}]}}', 'id': '.....', 'expires': 1719287312817, 'signature': '.....'}
20:46:33 [sartopo_python:1110:INFO] response code = 401
20:46:33 [sartopo_python:1138:ERROR] New map request failed:401:{"code":401,"message":"Authentication required","status":"error","timestamp":1719287192204}
20:46:33 [sartopo_python:305:INFO] New map request failed.  See the log for details.
20:46:33 [sartopo_python:2894:CRITICAL] Uncaught exception:
Traceback (most recent call last):
  File "C:\Users\caver\Documents\GitHub\sartopo_python\sartopo_python\test.py", line 6, in <module>
    sts=SartopoSession('caltopo.com',
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\caver\Documents\GitHub\sartopo_python\sartopo_python\sartopo_python.py", line 226, in __init__
    raise STSException
sartopo_python.STSException
20:46:33 [sartopo_python:892:INFO] SartopoSession instance deleted for map [NEW]new4240.
caver456 commented 3 days ago

Tried sending userdata, getting account data with /since/0, getting account data with sideload (but this is giving 401 login required), and undermaplimit (returning 200) before the CollaborativeMap request. No change - CollaborativeMap still gives 401 Authentication required.

Having trouble getting the json in sideload to be the same string that appears in chrome devtools, but, Matt points out sideload may not accept signed requests and isn't the right way to go anyway - which was the reason that getAccountData uses /since/0. See email thread "signed request questions".

If no luck on this in the next few days, it's probably best to change the docs to say that new maps are currently only supported on CTD, so that the documentation branch can move forward with Q&A and get merged to master, allowing for release of 2.0.0.

PS C:\Users\caver\Documents\GitHub\sartopo_python\sartopo_python> python test.py
C:\Users\caver\Documents\GitHub\sartopo_python\sartopo_python\sartopo_python.py:1060: SyntaxWarning: invalid escape sequence '\%'
  params['json']="\%7Bfull:+true\%7D"
14:48:49 [sartopo_python:964:INFO] pre-hashed data:POST /api/v0/userdata
1719697849708
{"map": {"center": [-120, 39], "zoom": 13}}
14:48:49 [sartopo_python:1050:INFO] {'json': '{"map": {"center": [-120, 39], "zoom": 13}}', 'id': '.....', 'expires': 1719697849708, 'signature': '.....'}
14:48:50 [sartopo_python:459:INFO] Getting account data:
14:48:50 [sartopo_python:964:INFO] pre-hashed data:GET /api/v1/acct/11UEE9/since/0
1719697850389

14:48:51 [sartopo_python:1074:INFO] SENDING GET to 'https://caltopo.com/api/v1/acct/11UEE9/since/0'
14:48:51 [sartopo_python:1075:INFO] {
   "json": "",
   "id": ".....",
   "expires": 1719697850389,
   "signature": "....."
}
14:48:51 [sartopo_python:1076:INFO] Prepared request URL:
14:48:51 [sartopo_python:1077:INFO] https://caltopo.com/api/v1/acct/11UEE9/since/0?json=&id=PJLLK0N9DR1F&expires=1719697850389&signature=EbPGr6VUIzXhpWLf7y3DpZ0vNx%2BYdEFqba6mVAEV2oM%3D
14:48:51 [sartopo_python:488:INFO] Getting sideload:
14:48:51 [sartopo_python:964:INFO] pre-hashed data:GET /sideload/account/11UEE9.json
1719697851514

14:48:51 [sartopo_python:1074:INFO] SENDING GET to 'https://caltopo.com/sideload/account/11UEE9.json'
14:48:51 [sartopo_python:1075:INFO] {
   "json": "\\%7Bfull:+true\\%7D",
   "id": ".....",
   "expires": 1719697851514,
   "signature": "....."
}
14:48:51 [sartopo_python:1076:INFO] Prepared request URL:
14:48:51 [sartopo_python:1077:INFO] https://caltopo.com/sideload/account/11UEE9.json?json=%5C%257Bfull%3A%2Btrue%5C%257D&id=PJLLK0N9DR1F&expires=1719697851514&signature=nMKBQ2iq%2B1qZVRoof%2BdWhFmCdxAYogQptG9eszrZMt4%3D
14:48:51 [sartopo_python:1103:INFO] response code = 401
14:48:51 [sartopo_python:1175:WARNING] response status other than "ok":  {'code': 401, 'message': 'login required', 'status': 'error', 'timestamp': 1719697731348}
14:48:51 [sartopo_python:493:INFO] Getting undermaplimit:
14:48:51 [sartopo_python:964:INFO] pre-hashed data:GET /api/v1/acct/11UEE9/undermaplimit
1719697851564

14:48:51 [sartopo_python:1074:INFO] SENDING GET to 'https://caltopo.com/api/v1/acct/11UEE9/undermaplimit'
14:48:51 [sartopo_python:1075:INFO] {
   "json": "",
   "id": ".....",
   "expires": 1719697851564,
   "signature": "....."
}
14:48:51 [sartopo_python:1076:INFO] Prepared request URL:
14:48:51 [sartopo_python:1077:INFO] https://caltopo.com/api/v1/acct/11UEE9/undermaplimit?json=&id=PJLLK0N9DR1F&expires=1719697851564&signature=uI2sJWbktlPx3HChe0W0BmRcGl9Yj8t9fdpRor4v%2BNo%3D
14:48:51 [sartopo_python:1166:ERROR] sendRequest: response had no decodable json:<Response [200]>
14:48:51 [sartopo_python:964:INFO] pre-hashed data:POST /api/v1/map/[NEW]myMap/[NEW]
1719697851632
{"properties": {"mapConfig": "{\"activeLayers\": [[\"mbt\", 1]]}", "cfgLocked": true, "title": "new", "mode": "sar"}, "state": {"type": "FeatureCollection", "features": [{"geometry": {"coordinates": [-120, 39, 0, 0], "type": "Point"}, "id": "11111111-1111-1111-1111-111111111111", "type": "Feature", "properties": {"creator": "11UEE9", "title": "NewMapDummyMarker", "class": "Marker"}}]}}
14:48:51 [sartopo_python:1050:INFO] {'json': '{"properties": {"mapConfig": "{\\"activeLayers\\": [[\\"mbt\\", 1]]}", "cfgLocked": true, "title": "new", "mode": "sar"}, "state": {"type": "FeatureCollection", "features": [{"geometry": {"coordinates": [-120, 39, 0, 0], "type": "Point"}, "id": "11111111-1111-1111-1111-111111111111", "type": "Feature", "properties": {"creator": "11UEE9", "title": "NewMapDummyMarker", "class": "Marker"}}]}}', 'id': '.....', 'expires': 1719697851632, 'signature': '.....'}
14:48:51 [sartopo_python:1103:INFO] response code = 401
14:48:51 [sartopo_python:1131:ERROR] New map request failed:401:{"code":401,"message":"Authentication required","status":"error","timestamp":1719697731472}
14:48:51 [sartopo_python:284:INFO] New map request failed.  See the log for details.
14:48:51 [sartopo_python:2887:CRITICAL] Uncaught exception:
Traceback (most recent call last):
  File "C:\Users\caver\Documents\GitHub\sartopo_python\sartopo_python\test.py", line 6, in <module>
    sts=SartopoSession('caltopo.com',
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\caver\Documents\GitHub\sartopo_python\sartopo_python\sartopo_python.py", line 226, in __init__
    raise STSException
sartopo_python.STSException
14:48:51 [sartopo_python:881:INFO] SartopoSession instance deleted for map [NEW]myMap.