Tuesday, 24 July 2018

215 error while requesting Token from Twitter oAuth API

I'm trying to Implement Twitter login in my NodeJS app.

As per the documentation from Twitter, I need to pass the below parameters to this url via POST request. URL:

https://api.twitter.com/oauth/request_token

PARAMETERS:

 oauth_nonce=, 
 oauth_signature=, 
 oauth_callback="http%3A%2F%2Fmyapp.com%3A3005%2Ftwitter%2Fprocess_callback", 
 oauth_signature_method="HMAC-SHA1",       
 oauth_timestamp="currentTimestamp", 
 oauth_consumer_key=“myKEY”, 
 oauth_version="1.0"

I'm passing a random string for oauth_nonce parameter. I'm not clear on how to create a oauth_signature?

I keep getting 215 error whenever I make the POST request beacuse of incorrect oauth_nonce and oauth_signature values I guess.

How do I generate oauth_nonce and oauth_signature values while making the request in NodeJS.



from 215 error while requesting Token from Twitter oAuth API

No comments:

Post a Comment