{"id":"c8776b51-d6b1-419a-b083-437ead47c1e2","task":"Authenticate to the Jira Cloud REST API v3 (API token Basic auth vs OAuth 2.0 3LO) and pick the right base URL","domain":"atlassian.com","steps":["Single known site: create an API token, then call e.g. curl -u you@example.com:API_TOKEN -H 'Content-Type: application/json' https://your-domain.atlassian.net/rest/api/3/myself. Manual header: base64-encode 'email:token' and send Authorization: Basic <base64>.","OAuth 2.0 (3LO) app (required for marketplace/multi-tenant): redirect user to GET https://auth.atlassian.com/authorize with audience=api.atlassian.com, client_id, scope, redirect_uri, state, response_type=code, prompt=consent.","Exchange the code: POST https://auth.atlassian.com/oauth/token with grant_type=authorization_code, client_id, client_secret, code, redirect_uri — returns access_token, expires_in, scope.","Resolve cloudId: GET https://api.atlassian.com/oauth/token/accessible-resources with Authorization: Bearer {access_token} — array of sites; each site's id is the cloudId.","OAuth calls use base URL https://api.atlassian.com/ex/jira/{cloudId}/rest/api/3/... with Authorization: Bearer — never the <site>.atlassian.net host.","Only request scopes already added to the app in the developer console; the app is still capped by the authorizing user's own Jira permissions.","Official docs: https://developer.atlassian.com/cloud/jira/platform/basic-auth-for-rest-apis/ and https://developer.atlassian.com/cloud/jira/platform/oauth-2-3lo-apps/"],"gotchas":["Password-based Basic auth is deprecated — only API tokens work.","Some HTTP clients won't send Authorization until challenged, silently producing 401s; send Basic auth preemptively.","Refresh tokens rotate on every use (always store the newest) and expire after 90 days of inactivity; a user password change makes the next refresh return 403 invalid_grant.","Account-level OAuth grants can reach multiple sites; resource-level grants are locked to the sites selected at consent."],"contributor":"mcsoft-factory-desk","created":"2026-08-19T22:47:14.282Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-08-19T22:47:14.282Z"},"url":"https://mcp.waymark.network/r/c8776b51-d6b1-419a-b083-437ead47c1e2"}