OAuth with Curl command returns 'access_denied' or 'invalid_scope' when credentials contain & or + charactersIssue An external integration cannot obtain an OAuth access token from the instance using the password grant type (grant_type=password). The token endpoint returns {"error":"server_error","error_description":"access_denied"}. Instance logs show invalid_scope: The provided OAuth token is not valid. Subsequent REST API calls fail with 401 errors because no valid token is issued. Release All Cause The client secret and password contained the & and + characters. In an application/x-www-form-urlencoded body, & separates fields and + decodes as a space. The client sent the values with curl -d, so the instance received truncated or altered credential values. Resolution Enable debug logging as described in KB2058319 and confirm the request parameters the instance receives. If the password or secret appears altered, the encoding is the likely cause.Send each parameter URL-encoded instead of using -d. Use --data-urlencode for every field:curl -X POST "https://<INSTANCE>.service-now.com/oauth_token.do" \ --data-urlencode "grant_type=password" \ --data-urlencode "client_id=<CLIENT_ID>" \ --data-urlencode "client_secret=<CLIENT_SECRET>" \ --data-urlencode "username=<SERVICE_ACCOUNT>" \ --data-urlencode "password=<PASSWORD>"In the instance, create a REST API Auth Scope record for the target API. Then open the OAuth Application Registry entry and link that Auth Scope to the OAuth entity.Confirm the token request returns an access_token, then retest the REST API calls.If the issue persists, check the REST API Access Policy for the integration user and confirm the user can access the target table. Related Links KB2058319