Redirecting to external validation page using oauth with drupal_http_request()
In the case the request is redirect to a different URL, $response-&gt;code is 301, and $response-&gt;redirect_url is the redirection URL. If the request is redirect, you can call drupal_http_request() using $response-&gt;redirect_url as new URL.

See aggregator_aggregator_fetch() as example of Drupal function that verifies the request is being redirected.

  // Process HTTP response code.
  switch ($result-&gt;code) {
    case 304:
      break;
    case 301:
      $feed-&gt;url = $result-&gt;redirect_url;
      // Do not break here.
    case 200:
    case 302:
    case 307:
      if (!isset($result-&gt;data)) {
        $result-&gt;data = '';
      }
      if (!isset($result-&gt;headers)) {
        $result-&gt;headers = array();
      }
      $feed-&gt;source_string = $result-&gt;data;
      $feed-&gt;http_headers = $result-&gt;headers;
      break;
    default:
      watchdog('aggregator', 'The feed from %site seems to be broken, due to "%error".', array('%site' =&gt; $feed-&gt;title, '%error' =&gt; $result-&gt;code . ' ' . $result-&gt;error), WATCHDOG_WARNING);
      drupal_set_message(t('The feed from %site seems to be broken, because of error "%error".', array('%site' =&gt; $feed-&gt;title, '%error' =&gt; $result-&gt;code . ' ' . $result-&gt;error)));
  }


If you want to redirect the users to $result-&gt;redirect_url, and not requesting that URL with drupal_http_request(), you use the following code.

drupal_goto($response-&gt;redirect_url, array('absolute' =&gt; TRUE));