#bearer token error

1 messages · Page 1 of 1 (latest)

digital wasp
#

Working from this documentation page: https://docs.sentry.io/api/auth/

I am trying to verify authentication. I've generated a token in Settings / Developer Settings / Auth Tokens. I've exported it as the TOKEN env var in the shell. I took the org slug from Settings / Organization / General Settings and I exported it as well.

Then I run:

curl -H "Authorization: Bearer ${TOKEN}" https://sentry.io/api/0/organizations/${ORG_SLUG}/projects/

But I get:

{"detail":"You do not have permission to perform this action."}

The token I generated is a very long string (more than 2 lines) that begins with sntrys_. The docs suggest it might be a lot shorter.

What am I doing wrong?

autumn vale
#

the token created in the organisation settings is used to upload files to sentry (dSYM, sourcemaps, proguard mappings...)
for other operations you need to create a personal auth token or use an internal integration token.
on both options you can choose the scopes you want