Incorrect Username or Password

101
1
3 weeks ago
cschooley
New Contributor II

I am not sure if this is the correct place to ask this, but:

In the Python API Sample Notebooks (downloaded from here), there are usernames and passwords to access sample data that doesn't work. 

For example in the 'Managing Offline Map Areas' notebook. Found following a similar path to: YOURLOCALPATH/PythonAPI/arcgis-python-api-1.8.5/guide/10-mapping-and-visualization/managing-offline-map-areas.ipynb

There are a few other notebooks as well with this issue, seems specific to the login:

 

Make a GIS Connection
The cell below is a generic placeholder to illustrate connecting to your GIS through a profile holding your specific credentials. This notebook accesses data shared within a particular ArcGIS Online Organization accessible with the following credentials:

url = https://www.arcgis.com
username = arcgis_python
password = P@ssword123

So make a connection with the following syntax to continue running through the notebook: gis = GIS("https://www.arcgis.com", "arcgis_python", "P@ssword123")

 

I am curious if anyone from ESRI could help out with this, or if anyone has also ran into this and perhaps the credentials have changed. I have ran just as it is stated above and am given this error.

 

RuntimeError: Unable to generate token.
Invalid username or password.
(Error Code: 400)

 

Thanks!

0 Kudos
1 Reply
MikeMacRae
Regular Contributor

It might be the casing of your user name. It's case sensitive using the API, so you must match how it was set. In my situation, my username was set as all caps, so my script will only accept my username in that format.

0 Kudos