Skip to content

Commit 7595ba9

Browse files
chore(js): Deprecate apiKey field (#2937)
### Description Deprecate the `apiKey` field, which is used to set the already-deprecated `SENTRY_API_KEY` environment variable. Also, update the docstrings for `apiKey` and `authToken` to clarify that the two options are not interchangeable. `apiKey` only takes a legacy API key; `authToken` takes auth tokens. ### Issues - Resolves #2936 - Resolves CLI-223
1 parent b850dc9 commit 7595ba9

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
### Deprecations
66

7-
- Deprecated API key authentication ([#2934](https://github.com/getsentry/sentry-cli/pull/2934)). Users who are still using API keys to authenticate Sentry CLI should generate and use an [Auth Token](https://docs.sentry.io/account/auth-tokens/) instead.
7+
- Deprecated API key authentication ([#2934](https://github.com/getsentry/sentry-cli/pull/2934), [#2937](https://github.com/getsentry/sentry-cli/pull/2937)). Users who are still using API keys to authenticate Sentry CLI should generate and use an [Auth Token](https://docs.sentry.io/account/auth-tokens/) instead.
88

99
### Improvements
1010

js/index.d.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,15 @@ declare module '@sentry/cli' {
99
*/
1010
url?: string;
1111
/**
12-
* Authentication token for API, interchangeable with `apiKey`.
12+
* Authentication token for HTTP requests to Sentry.
1313
* This value will update `SENTRY_AUTH_TOKEN` env variable.
1414
*/
1515
authToken?: string;
1616
/**
17-
* Authentication token for API, interchangeable with `authToken`.
17+
* API key to authenticate any HTTP requests to Sentry (legacy authentication method).
1818
* This value will update `SENTRY_API_KEY` env variable.
19+
* @deprecated Use auth-token-based authentication via `authToken` instead.
20+
* This option is scheduled for removal in the next major release.
1921
*/
2022
apiKey?: string;
2123
/**

0 commit comments

Comments
 (0)