Auth 401 error


Hi team,

Am trying to get token using Oauth header but getting 401 error.
Mentioned below the details.

Step 1: Creating ‘header’

OAuth oauth_consumer_key=Zy4445s1rxQoOHlXz6K3fw,oauth_nonce=35698,oauth_signature=lgIJMZWIUq8qyNhQF4buq%2FiHFDE%3D,oauth_signature_method=HMAC-SHA1,oauth_timestamp=1332151037,oauth_token=22509602-ArvOybvGDwExBPB1sOBQoM5L5vlrHokfvtTiwVd4f,oauth_version=1.0

Step 2 : Connection & set

    connection.setRequestProperty("Authorization", header);

Error :

Exception : Server returned HTTP response code: 401 for URL:

Please help me to resolve the issue.


What have you tried in the way of debugging? Have you tried exploring the API outside of the library you’re using? Have you tried inspecting the error response for more information? See [node:204].