You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can set the security parameters through the `security` optional parameter when initializing the SDK client instance. The selected scheme will be used by default to authenticate with the API for all operations that support it. For example:
209
+
To authenticate with the API the `apiToken`parameter must be set when initializing the SDK client instance. For example:
215
210
```typescript
216
211
import { Glean } from"@gleanwork/api-client";
217
212
218
213
const glean =newGlean({
219
-
security: {
220
-
apiToken: process.env["GLEAN_API_TOKEN"] ??"",
221
-
},
214
+
apiToken: process.env["GLEAN_API_TOKEN"] ??"",
222
215
});
223
216
224
217
asyncfunction run() {
@@ -770,9 +763,7 @@ To change the default retry strategy for a single API call, simply provide a ret
770
763
import { Glean } from"@gleanwork/api-client";
771
764
772
765
const glean =newGlean({
773
-
security: {
774
-
apiToken: process.env["GLEAN_API_TOKEN"] ??"",
775
-
},
766
+
apiToken: process.env["GLEAN_API_TOKEN"] ??"",
776
767
});
777
768
778
769
asyncfunction run() {
@@ -834,9 +825,7 @@ const glean = new Glean({
834
825
},
835
826
retryConnectionErrors: false,
836
827
},
837
-
security: {
838
-
apiToken: process.env["GLEAN_API_TOKEN"] ??"",
839
-
},
828
+
apiToken: process.env["GLEAN_API_TOKEN"] ??"",
840
829
});
841
830
842
831
asyncfunction run() {
@@ -954,9 +943,7 @@ import { Glean } from "@gleanwork/api-client";
954
943
955
944
const glean =newGlean({
956
945
instance: "<value>",
957
-
security: {
958
-
apiToken: process.env["GLEAN_API_TOKEN"] ??"",
959
-
},
946
+
apiToken: process.env["GLEAN_API_TOKEN"] ??"",
960
947
});
961
948
962
949
asyncfunction run() {
@@ -1000,9 +987,7 @@ import { Glean } from "@gleanwork/api-client";
0 commit comments