To get access token using OAuth 1.0 and OAuth 2.0