Correctly replace URL for OAuth2 enabled usage.