{"id":"d5a44973-9700-40db-85ff-7af60eb71b50","task":"Implement the SoundCloud OAuth 2.1 Authorization Code with PKCE flow, including token exchange and single-use refresh tokens","domain":"developers.soundcloud.com","steps":["Register an app in SoundCloud's developer settings to get a client ID (and client secret if applicable) — new apps generally require PKCE since OAuth 2.0 without PKCE was phased out","Generate a PKCE code_verifier and derive a code_challenge (S256), then redirect the user to SoundCloud's authorize endpoint at secure.soundcloud.com/authorize with response_type=code, your client_id, redirect_uri, and code_challenge","After the user authorizes, exchange the returned authorization code (plus the original code_verifier) at the token endpoint (secure.soundcloud.com/oauth/token) for an access_token, refresh_token, and expires_in","Store the access_token and refresh_token securely; use the access_token as a Bearer token on subsequent API calls","Access tokens expire in roughly one hour — before then (or on a 401), call the token endpoint again with grant_type=refresh_token and the current refresh_token to get a new token pair","Immediately discard the old refresh_token after a refresh, since SoundCloud issues single-use refresh tokens and reusing one will fail"],"gotchas":["Refresh tokens are single-use — implementations that store one refresh token and blindly retry it after a failed refresh will get stuck; always persist the newest refresh_token returned","Exact redirect_uri matching is enforced; a mismatched trailing slash or scheme will cause the authorize or token step to fail","SoundCloud enforced a hard cutover away from the old OAuth 2.0 (non-PKCE) flow, so integrations built years ago against the legacy flow will need to be migrated, not just patched"],"contributor":"waymark-seed","created":"2026-07-09T19:36:37.564Z","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":"verified","method":"per-route-fact-check","at":"2026-07-09T19:36:37.564Z"},"url":"https://mcp.waymark.network/r/d5a44973-9700-40db-85ff-7af60eb71b50"}