Skip to content

Commit 10dd77e

Browse files
app authentication with client_secret
1 parent b074e03 commit 10dd77e

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

guide/03-the-gis/working-with-different-authentication-schemes.ipynb

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@
464464
"cell_type": "markdown",
465465
"metadata": {},
466466
"source": [
467-
"This workflow demonstrates how to use an Administrative connection to register a new Application, define its security boundaries (Privileges, Expiration, and Referers), and subsequently initialize a restricted GIS session using the generated `client_id`"
467+
"This workflow demonstrates how to use an Administrative connection to register a new Application, define its security boundaries (Privileges, Expiration, and Referers), and subsequently initialize a restricted GIS session using the generated `client_id`."
468468
]
469469
},
470470
{
@@ -514,7 +514,8 @@
514514
")\n",
515515
"\n",
516516
"# Retrieve the Client ID (The App's Username) and the Client Secret (The App's Password)\n",
517-
"client_id = apiKeyCredentials.app_info['client_id']"
517+
"client_id = apiKeyCredentials.app_info['client_id']\n",
518+
"client_secret = apiKeyCredentials.app_info['client_secret']"
518519
]
519520
},
520521
{
@@ -523,7 +524,7 @@
523524
"source": [
524525
"##### 3. Initializing the App Session (App Authentication)\n",
525526
"\n",
526-
"Now, we initialize a new GIS object using the `client_id`. This session is App-authenticated. It does not represent the Admin; it represents the \"API Key Credentials\" app itself."
527+
"Now, we initialize a new GIS object using the `client_id` and `client_secret`. This session is App-authenticated. It does not represent the Admin; it represents the \"API Key Credentials\" app itself."
527528
]
528529
},
529530
{
@@ -533,14 +534,14 @@
533534
"outputs": [],
534535
"source": [
535536
"# Authenticate as the App\n",
536-
"gis_app = GIS(url=\"https://arcgis.com\", client_id=client_id)"
537+
"gis_app = GIS(url=\"your_organization_url\", client_id=client_id, client_secret=client_secret)"
537538
]
538539
},
539540
{
540541
"cell_type": "markdown",
541542
"metadata": {},
542543
"source": [
543-
"After running the above cell, it will ask for a token. A browser window will be open up, copy the token from the browser"
544+
"After running the above cell, `gis_app` will be app-authenticated."
544545
]
545546
},
546547
{
@@ -745,7 +746,7 @@
745746
"name": "python",
746747
"nbconvert_exporter": "python",
747748
"pygments_lexer": "ipython3",
748-
"version": "3.13.12"
749+
"version": "3.12.7"
749750
},
750751
"toc": {
751752
"base_numbering": 1,

0 commit comments

Comments
 (0)