request_token clarifications


Hi, I tried to implements the request_token call but I am stuck on the 401 error. The steps I followed are

  1. getting the current timestamp from the twitter server
  2. I encoded oauth_callback, oauth_consumer_key, oauth_nonce, oaut_signature_method, oauth_timestamp, oauth_token, oauth_version,
    and for each pair key value I generate the percent econding of key=value&
  3. I generate the signature with method_uppercase&percented_encoded_httpurl+&the_string_at_step_2
  4. I generate the Authorization string:

OAuth oauth_callback=“”, oauth_consumer_key=“6gGR8PjjI7oprW01Mtn8Wg”, oauth_nonce=“d2ed77f9b2b31421ad3edc10e5b478ac”, oauth_signature=“ZHURvnIIa5nQFjTfZ0JbKjkRGhA%3D”, oauth_signature_method=“HMAC-SHA1”, oauth_timestamp=“1382168613”, oauth_version=“1.0”

but I always get the 401. Could you somebody help understand what I am doing wrong?