Skip to content
This repository has been archived by the owner on Apr 3, 2021. It is now read-only.

Oauth Access Token #22

Open
gbubemismith opened this issue Jul 18, 2020 · 1 comment
Open

Oauth Access Token #22

gbubemismith opened this issue Jul 18, 2020 · 1 comment

Comments

@gbubemismith
Copy link

Hello,
This is not really an issue. I'm having problems getting access token from https://api.twitter.com/oauth/access_token, it returns a 401 authorization required.

This is my Oauth Request
var oauthClient = new OAuthRequest
{
Method = "POST",
Type = OAuthRequestType.AccessToken,
SignatureMethod = OAuthSignatureMethod.HmacSha1,
ConsumerKey = consumerKey,
ConsumerSecret = consumerSecret,
RequestUrl = "https://api.twitter.com/oauth/access_token",
Token = request_token,
Version = "1.0a",
Realm = "twitter.com"
};

I would appreciate if you could help.

@najsgrgutin
Copy link

najsgrgutin commented Nov 4, 2020

You should use method = "GET" and add Verifier property value recieved from twitter after successful redirection. This works fine for me:

var client = new OAuthRequest
{
Method = "GET",
Type = OAuthRequestType.AccessToken,
SignatureMethod = OAuthSignatureMethod.HmacSha1,
ConsumerKey = _apiKey,
ConsumerSecret = _apiKeySecret,
RequestUrl = "https://api.twitter.com/oauth/access_token",
Version = "1.0a",
Token = oauthToken,
Verifier = oauthVerifier
};

Hello,
This is not really an issue. I'm having problems getting access token from https://api.twitter.com/oauth/access_token, it returns a 401 authorization required.

This is my Oauth Request
var oauthClient = new OAuthRequest
{
Method = "POST",
Type = OAuthRequestType.AccessToken,
SignatureMethod = OAuthSignatureMethod.HmacSha1,
ConsumerKey = consumerKey,
ConsumerSecret = consumerSecret,
RequestUrl = "https://api.twitter.com/oauth/access_token",
Token = request_token,
Version = "1.0a",
Realm = "twitter.com"
};

I would appreciate if you could help.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants