Validate a twitter token

ios
android
dotnet
oauth

#1

I’m using .net core 2.2 in order to validate a token returned from a mobile application. The token is of the form 100000000-c_________________________________X
I’m using twitter API: https://api.twitter.com/1.1/account/verify_credentials.json with the following form:

https://api.twitter.com/1.1/account/verify_credentials.json?"+ "oauth_consumer_key=KEY" + "&oauth_nonce=" + oauthNonce + "&oauth_signature_method=HMAC-SHA256&" + "oauth_token= 100000000-c_____________________________________X" + "&oauth_timestamp=123456789" + "&oauth_version=1.0" + "&oauth_signature=6AmcSmR63gmk1bohzErQ3sqD43a5AYKbLwxHxfRHMAk=
I’m always having bad request or bad authentication with the code 215.
Can anybody help me please in order to validate the the token returned is really a valid twitter token ?


#2

The oauth parameters must be included as HTTP headers, not as part of the URL, for example:
https://developer.twitter.com/en/docs/basics/authentication/guides/creating-a-signature

It might be easier to use an existing .net library for oauth / twitter API https://developer.twitter.com/en/docs/developer-utilities/twitter-libraries.html


closed #3

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.