OAuth Token Refresh failing with 401 for Multi-Org AppFoundry Integration

Dealing with a very strange bug here with the /api/v2/oauth/token endpoint during token refresh for a multi-org premium app. The initial authorization code grant succeeds, but the refresh token request fails immediately after 5 minutes.

  1. Generate auth code via https://login.mypurecloud.com/oauth/authorize
  2. Exchange code for access/refresh tokens
  3. Wait 300 seconds
  4. POST to /api/v2/oauth/token with grant_type=refresh_token

The response returns 401 Unauthorized with error: invalid_grant. The client secret is correct and the scopes match. Is there a known issue with refresh token validity in the EU-West-1 region?

"grant_type": "refresh_token",
"refresh_token": "{{your_refresh_token}}",
"scope": "legacy:org:read" // <-- Critical for Multi-Org

The default scope often drops in multi-org refreshes. Adding the explicit org scope usually clears that 401. We see this constantly when WFM syncs hit premium app boundaries.