Open guillaumelachaud opened 1 month ago
Assigning to @getsentry/support for routing ⏲️
cc @sentaur-athena We have stumbled upon this problem when working on the Linear integration but I can reproduce with a newly created integration for repro purposes.
Routing to @getsentry/product-owners-settings-integrations for triage ⏲️
Thanks for detailed repro steps. We will look into it.
@guillaumelachaud Just to get more details, what specific URLs are you calling with the access token?
Just to get more details, what specific URLs are you calling with the access token?
POST https://sentry.io/api/0/sentry-app-installations/<installation_id>/authorizations/
to get the tokens
PUT https://sentry.io/api/0/sentry-app-installations/<installation_id>/authorizations/
to verify the installation
GET https://sentry.io/api/0/issues/<issue_id>/
to get an issue
@guillaumelachaud I was able to reproduce this issue with the issues endpoint that you specified. This endpoint only works for querying issues within our US region. We now recommend using GET https://sentry.io/api/0/organization/<org_id_or_slug>/issues/<issue_id>/
, which queries both our US and EU regions.
We are working on updating our documentation to provide support for our region-specific endpoints. Sorry for the confusion!
@guillaumelachaud I was able to reproduce this issue with the issues endpoint that you specified. This endpoint only works for querying issues within our US region. We now recommend using
GET https://sentry.io/api/0/organization/<org_id_or_slug>/issues/<issue_id>/
, which queries both our US and EU regions.We are working on updating our documentation to provide support for our region-specific endpoints. Sorry for the confusion!
Does this apply to all endpoints, including /sentry-app-installations
?
POST https://sentry.io/api/0/sentry-app-installations/
/authorizations/ to get the tokens PUT https://sentry.io/api/0/sentry-app-installations/ /authorizations/ to verify the installation GET https://sentry.io/api/0/issues/ / to get an issue
@guillaumelachaud Of the endpoints you mentioned, only the/issues
endpoint needs to be updated
Are you planning to add an organizationId
field in the verify response payload? This would allow us to capture the organizationId
as part of the OAuth flow. Currently, it only returns the slug. We can use the slug to construct the new URLs, but the slug is mutable by the end user so we'd rather rely on the organization ID instead of handling potential changes.
Yes, ideally all the endpoints returning slug should also return ID. Unfortunately. some of the endpoints are old and don't follow this standard though. You mean the oauth/token/ endpoint?
No, I'm referring to /sentry-app-installations/<installation_uuid>/
specifically. We are already calling this endpoint and getting back a slug. Would be convenient if we could get the organization ID at the same time. Otherwise we'll have to make an additional API call just to get it.
@guillaumelachaud I just added id
to the response payload under organization
. Returning to the original issue, did using the updated endpoint fix the 401 you were receiving?
Environment
SaaS (https://sentry.io/)
Steps to Reproduce
PUT https://sentry.io/api/0/sentry-app-installations/<installation_id>
and body{"status": "installed"}
{"detail":"Invalid token"}
Expected Result
Actual Result
After refreshing the token, all subsequent calls will fail with 401
{"detail":"Invalid token"}
.I can reproduce this behavior using curl commands or with a REST client on Sentry EU instances only. Doing the same flow ona Sentry US workspace works flawlessly.
Product Area
Settings - Integrations
Link
No response
DSN
No response
Version
No response