File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed
Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ Each namespace has its own authentication requirements and access patterns. Whil
1717from glean import Glean, models
1818import os
1919
20- with Glean(bearer_auth = " client-token" ) as glean:
20+ with Glean(api_token = " client-token" ) as glean:
2121 search_response = glean.client.search.query(
2222 search_request = models.SearchRequest(query = " search term" )
2323 )
@@ -27,7 +27,7 @@ with Glean(bearer_auth="client-token") as glean:
2727from glean import Glean, models
2828import os
2929
30- with Glean(bearer_auth = " indexing-token" ) as glean:
30+ with Glean(api_token = " indexing-token" ) as glean:
3131 document_response = glean.indexing.documents.index(
3232 document = models.Document(
3333 id = " doc-123" ,
@@ -621,7 +621,7 @@ import os
621621
622622
623623with Glean(
624- bearer_auth = os.getenv(" GLEAN_BEARER_AUTH " , " " ),
624+ api_token = os.getenv(" GLEAN_API_TOKEN " , " " ),
625625) as g_client:
626626 try :
627627 res = g_client.client.search.execute(search_request = models.SearchRequest(
Original file line number Diff line number Diff line change 1- GLEAN_BEARER_AUTH = your_bearer_token_here
1+ GLEAN_API_TOKEN = your_bearer_token_here
Original file line number Diff line number Diff line change 77
88
99with Glean (
10- bearer_auth = os .getenv ("GLEAN_BEARER_AUTH " , "" ),
10+ api_token = os .getenv ("GLEAN_API_TOKEN " , "" ),
1111 domain = "customerName"
1212) as glean :
1313 try :
You can’t perform that action at this time.
0 commit comments