Skip to content

Commit bf06993

Browse files
committed
Merge pull request #591 from getsentry/fix-api-docs
Update docs to use auth tokens
2 parents a61ed80 + b653505 commit bf06993

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

docs/sourcemaps.rst

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,10 @@ sourcemaps) within Sentry. This removes the requirement for them to be
7676
web-accessible, and also removes any inconsistency that could come from
7777
network flakiness (on either your end, or Sentry's end).
7878

79-
* Start by creating a new API key under your organization's API Keys nav
80-
(on the home).
79+
* Start by creating a new authentication token under **[Account] > API**.
8180
* Ensure you you have ``project:write`` selected under scopes.
82-
* You'll use HTTP basic auth with the api key being your username, and an
83-
empty value for the password.
81+
* You'll use the Authorization header with the value of ``Bearer: {TOKEN}``
82+
with API requests.
8483

8584
Now you need to setup your build system to create a release, and attach
8685
the various source files. You will want to upload all dist files (i.e. the
@@ -91,10 +90,10 @@ sourcemaps point to.
9190
9291
# Create a new release
9392
$ curl https://app.getsentry.com/api/0/projects/:organization_slug/:project_slug/releases/ \
94-
-u [api_key]: \
9593
-X POST \
96-
-d '{"version": "2da95dfb052f477380608d59d32b4ab9"}' \
94+
-H 'Authorization: Bearer {TOKEN}' \
9795
-H 'Content-Type: application/json'
96+
-d '{"version": "2da95dfb052f477380608d59d32b4ab9"}' \
9897
9998
{
10099
"dateCreated": "2015-03-06T04:51:32.723Z",
@@ -112,8 +111,8 @@ reference to ``app.map.js``, the name of the uploaded file should be ``http://ex
112111
113112
# Upload a file for the given release
114113
$ curl https://app.getsentry.com/api/0/projects/:organization_slug/:project_slug/releases/2da95dfb052f477380608d59d32b4ab9/files/ \
115-
-u [api_key]: \
116114
-X POST \
115+
-H 'Authorization: Bearer {TOKEN}' \
117116
118117
-F name="http://example.com/app.js.map"
119118
@@ -132,7 +131,7 @@ reference to ``app.map.js``, the name of the uploaded file should be ``http://ex
132131
133132
# If you make a mistake, you can also simply clear out the release
134133
$ curl https://app.getsentry.com/api/0/projects/:organization_slug/:project_slug/releases/2da95dfb052f477380608d59d32b4ab9/ \
135-
-u [api_key]: \
134+
-H 'Authorization: Bearer {TOKEN}' \
136135
-X DELETE
137136
138137
Additionally, you'll need to configure the client to send the ``release``:

0 commit comments

Comments
 (0)